Skip to content

v1.1

Choose a tag to compare

@andriishin andriishin released this 10 Nov 20:11
· 130 commits to main since this release

Nanolog 1.1 is a compatibility and robustness release: the public API only grows, and every change below is covered by tests under a 100% pitest mutation threshold.

New

  • Overloads LOG.info(throwable, "... {} ...", args) and LOG.info(sourceClass, throwable, "... {} ...", args) for every level (trace, debug, info, warn, error): log an exception together with a parameterized message in one call.
  • The jar declares Automatic-Module-Name: com.nanolaba.nanolog, so modular applications can requires com.nanolaba.nanolog;.

Fixes

  • Caller detection resolves classes through the thread's context class loader first and skips frames it cannot see, instead of failing in application servers and plugin frameworks where Nanolog lives in a parent class loader.
  • nanolog.properties: only keys with the nanolog. prefix are copied into system properties; other keys are ignored, so the file can no longer alter unrelated JVM settings.
  • Slf4jLogger: a null source class goes to the ROOT logger instead of throwing; an entry without a message no longer logs the word null.
  • ConsoleLogger: timestamp formatting is thread-safe.
  • LogEntry: a broken toString() inside an Object[] argument no longer propagates to the caller; only that element is rendered as [FAILED toString()].
  • A null context class loader at startup is tolerated.
  • The diagnostic for a missing configuration file names the right property (nanolog.config).

Documentation and build

  • README rewritten around the real usage flow (English and Russian); code samples are imported from compiled sources, so they cannot go stale.
  • CI actions are pinned to commit SHAs with a read-only token, and the generated README is checked for drift on every build.

Installation

<dependency>
    <groupId>com.nanolaba</groupId>
    <artifactId>nanolog</artifactId>
    <version>1.1</version>
</dependency>
implementation("com.nanolaba:nanolog:1.1")

Requires Java 8 or later. slf4j-api is needed only when Slf4jLogger is used.

Full changelog: v1.0...v1.1