Repository navigation
Squid 1.3 adds logger adapters for external libraries, configurable source locations, and fixes for log data and error handling.
What’s new
- Added squid.get_logger(tag, is_allowed, stack_level), an adapter with dot- and colon-compatible logging methods for libraries such as Pigeon and Saver.
- Added optional stack_level arguments and the STACK_DEFAULT and STACK_WRAPPER constants for choosing which caller appears in debug logs.
- Added a Lua regression suite covering logging, filtering, adapters, source locations, and error handling.
Fixes
- String tags are no longer duplicated as Data:; boolean false is now logged as data.
- Error handling tolerates missing source, message, or traceback fields.
- Save paths and save errors are included in log messages.
- Removed the extra config/ prefix from Linux log paths.
Upgrading from 1.2
Existing documented logging calls remain valid. The new trailing stack_level arguments are optional and retain the previous default of 3.
Some behavior changes may affect existing projects:
- squid.new(tag) now preserves the tag’s allowlist state when is_allowed is omitted. Pass false explicitly to retain the previous behavior.
- Strings passed as data_or_tag are no longer printed as data. Put text payloads in the message or a table.
- On Linux, new logs may be written to a different location. Existing logs are not migrated.
- The log text format has changed; tools that parse exact output may need updating.