Loading Rules from Local Files

Posted 11/30/2019 by @robfromboulder

Loggers can now load logging rules from local files, using either relative or absolute paths. This makes groups of rules easier to develop and share between apps.

Why load from files?

Logging rules have (before now) always been specified in-line as part of configuring a logger. Our thinking was that the rules would then always been in sync with the application itself. But this can be tedious to have to rebuild/redeploy your API service just to try a tweak to the logging rules. And externalizing rules into files unlocks new ways to share sets of rules between applications.

Examples

The path to the rules file can be either absolute or relative.

// Java example
logger = new HttpLogger("https://...", "file://./rules.txt");

# Node.js example
logger = new HttpLogger({url: 'https://...', rules: 'file://./rules.txt'});

Supported logger versions

    Resurface

PRODUCT | RESOURCES | BLOG | ABOUT
Licenses | Privacy | Terms

Based in Boulder, CO, USA
© 2020 Resurface Labs Inc.