Managing logfiles
Like many basic features in a developer's toolbox, Go provides a fairly complete solution built-in for logging. It handles many of the basics, such as creating timestamp-marked log items and saving to disk or to console.
One thing the basic package misses out on is built-in formatting and log rotation, which are key requirements for our file manager application.
Remember that key requirements for our application include the ability to work seamlessly in our concurrent environment and be ready to scale to a distributed network if need be. This is where the fine log4go application comes in handy. Log4go allows logging to file, console, and memory and handles log rotation inherently.
Note
Log4go can be found at https://code.google.com/p/log4go/ ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access