Skip to content

itjustcrashed/environmentlogger

Repository files navigation

GitHub Issues

EnvironmentLogger

EnvironmentLogger is a cross-platform logging framework that is configured using environment variables, similar to env_logger.

The framework is supported on iOS, macOS, watchOS, tvOS, visionOS, GNU/Linux, musl/Linux, Android and Windows. FreeBSD support will be added once I figure out how to sanely develop on that operating system.

Note

The logger is routed to stderr on non-Apple operating systems.

Important

The logger is routed directly to the unified logging system on all Apple operating systems (or anywhere that os.log can be imported).

Why This Framework Exists

As more projects written in Swift target non-Apple operating systems,

Configuration

EnvironmentLogger is configured using two variables:

  • LOG_LEVEL: The level to print logs from. This can be trace, debug, info, warning, or error (default).
  • LOG_MODE: The mode to print logs in. This can be pretty (default), timed, or full.

Attributions

This library was created partially using Google Gemini to summarize documentation of the APIs in Foundation.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages