Discover Packages
github.com/ardanlabs/gotraining
topics
go
packages
logging
directory
Version:
v0.0.0-...-818bd76
Opens a new window with list of versions in this module.
Published: Jul 2, 2024
License: Apache-2.0
Opens a new window with license information.
README
README
¶
Logging - Standard Library
Logging is an important part of every program. Logs are our eyes and history to what is happening inside the program as it runs. The standard library provides the log package to support the basic features of logging and the ability for you to extend and customize logging to fit your needs.
Notes
Support for logging is already built into the standard library.
The log package can be easily extended to meet your logging needs.
Links
Using The Log Package In Go - William Kennedy
Code Review
Use of log package (Go Playground )
Customizing your own log (Go Playground )
Exercises
Exercise 1
Setup a new program to use the log package. Set the Prefix to your first name and on each log line show the date and long path for the code file.
Template (Go Playground ) |
Answer (Go Playground )
All material is licensed under the Apache License Version 2.0, January 2004 .
Expand ▾
Collapse ▴
Directories
¶
Sample program to show how to use the log package from the standard library.
Sample program to show how to use the log package from the standard library.
Sample program to show how to extend the log package from the standard library.
Sample program to show how to extend the log package from the standard library.
exercises
exercise1
Setup a new program to use the log package.
Setup a new program to use the log package.
template1
Setup a new program to use the log package.
Setup a new program to use the log package.
Click to show internal directories.
Click to hide internal directories.