Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a logging policy using sync/atomic load and store value #153

Merged
merged 25 commits into from
Sep 2, 2021

Commits on Apr 11, 2021

  1. Add logging policy

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    09232ff View commit details
    Browse the repository at this point in the history

Commits on May 31, 2021

  1. Add debug and logging libraries

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed May 31, 2021
    Configuration menu
    Copy the full SHA
    f0b0167 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2021

  1. Sync/atomic version of debug log

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 1, 2021
    Configuration menu
    Copy the full SHA
    2f45ea5 View commit details
    Browse the repository at this point in the history
  2. Remote logging interface from main package

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 1, 2021
    Configuration menu
    Copy the full SHA
    cdd91d8 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2021

  1. Make dbg package a singleton

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    98664ee View commit details
    Browse the repository at this point in the history
  2. Make log package more configurable

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    265fb75 View commit details
    Browse the repository at this point in the history
  3. Update main.go with log and dbg package changes

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 7, 2021
    Configuration menu
    Copy the full SHA
    37ecd01 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2021

  1. Remove Flag output option for logs

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 19, 2021
    Configuration menu
    Copy the full SHA
    6bbaba2 View commit details
    Browse the repository at this point in the history
  2. Add documentation to log and dbg packages

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 19, 2021
    Configuration menu
    Copy the full SHA
    914cc23 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2021

  1. instantiate log in run, not main; fmt.print errors and not log

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 23, 2021
    Configuration menu
    Copy the full SHA
    94c5a78 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2021

  1. rename print{f,ln} methods to log{f,ln}; use interface, not string args

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    e7b82d8 View commit details
    Browse the repository at this point in the history
  2. Make atomic.Value not a global

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    ef29245 View commit details
    Browse the repository at this point in the history
  3. undo using log and return to printing directly to stderr

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    316b47b View commit details
    Browse the repository at this point in the history
  4. Rename dbgLog struct to dbg

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    001cd5c View commit details
    Browse the repository at this point in the history
  5. Undo change to error server stop message

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jun 29, 2021
    Configuration menu
    Copy the full SHA
    38f2a65 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2021

  1. Changes per PR: Rename, remove param, change output

    - Raname config->logcfg in main.go
    - Remove log from srvmgmt.go
    - Use stdOut for errors being logged in main.go
    
    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    644e17e View commit details
    Browse the repository at this point in the history
  2. Guard dbg methods scope concurrent processes

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jul 5, 2021
    Configuration menu
    Copy the full SHA
    27dce31 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2021

  1. use dbg object's methods over global's; move var closer to use

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    b563c5d View commit details
    Browse the repository at this point in the history
  2. Add benchmark test

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    85d5bbe View commit details
    Browse the repository at this point in the history
  3. improve benchmark test

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jul 10, 2021
    Configuration menu
    Copy the full SHA
    9303f1b View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2021

  1. Use b.RunParallel in benchmark tests

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    1007345 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2021

  1. store and load log.Logger in sync/atomic value

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Jul 27, 2021
    Configuration menu
    Copy the full SHA
    08aab25 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2021

  1. Add tests ensuring debug setting works as intended

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Aug 5, 2021
    Configuration menu
    Copy the full SHA
    050f097 View commit details
    Browse the repository at this point in the history
  2. Test Logf after second SetOut

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Aug 5, 2021
    Configuration menu
    Copy the full SHA
    2b92b15 View commit details
    Browse the repository at this point in the history
  3. Update main.go to use dbg.SetOut

    Signed-off-by: codegold79 <codegold79@gmail.com>
    codegold79 committed Aug 5, 2021
    Configuration menu
    Copy the full SHA
    3c42fd6 View commit details
    Browse the repository at this point in the history