Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 2.58 KB

README.md

File metadata and controls

74 lines (48 loc) · 2.58 KB

Flog

A simple file logger written in Golang.

License: MIT Maintenance Golint code style Go Report Card codecov Github all releases

Usage

Import package to your project.

Instantiate a new logger with a given filepath, where the logs shall be written to.

logger, logErr := flog.NewFileLogger("test.log")

Call the appropriate function when logging INFO, DEBUG, WARNING or ERROR messages

// print INFO message
logger.PrintInfo("Printing \"%s\" message", "INFO")

// print DEBUG message
logger.PrintDebug("Printing \"%s\" message", "DEBUG")

// print WARNING message
logger.PrintWarning("Printing \"%s\" message", "WARNING")

// print ERROR message
logger.PrintError("Printing \"%s\" message", "ERRROR")

Example output

example

Release History

  • 1.0.1 (05/20/19)

    • Added License
    • some changes in README.md
  • 1.0.0 (05/20/19)

    • Initial commit/release

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Meta

hackmac89 – @hackmac89hackmac89@filmdatenbank-manager.dehttps://github.com/hackmac89/

Contributing

  1. Fork it (https://github.com/hackmac89/flog/fork)
  2. Create your feature branch (git checkout -b feature/featurename)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin feature/featurename)
  5. Create a new Pull Request