A simple file logger written in Golang.
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")
-
1.0.1 (05/20/19)
- Added License
- some changes in README.md
-
1.0.0 (05/20/19)
- Initial commit/release
We use SemVer for versioning. For the versions available, see the tags on this repository.
- hackmac89 - Initial work - hackmac89
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details
hackmac89 – @hackmac89 – hackmac89@filmdatenbank-manager.de – https://github.com/hackmac89/
- Fork it (https://github.com/hackmac89/flog/fork)
- Create your feature branch (
git checkout -b feature/featurename
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin feature/featurename
) - Create a new Pull Request