Registry / devops / atma-logger

atma-logger

JSON →
library1.0.2jsnpmunverified

atma-logger is a browser and Node.js logging library with support for string coloring (ASCII/HTML), object formatting (handles circular references), and multiple transports including console, file system, HTTP (e.g., Loggly), and streams. It offers scoped loggers, configurable log levels and dates, and stdout/stderr interception in Node. Version 1.0.2 is the latest stable release; the library appears to be in maintenance mode with infrequent updates. Compared to alternatives like Winston or Pino, it provides built-in coloring and a simpler API but lacks modern features like structured JSON logging or async support.

npm install atma-logger
INSTALL
IMPORT
SIG · ATMA-LOGGER
A
atma-logger
devopsjavascriptv1.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

logger
var logger = require('atma-logger');
import logger from 'atma-logger';
Package is CommonJS only; no ESM exports or default export.
logger (global)
require('atma-logger/lib/global');
require('atma-logger').global();
Global export is a side-effect require; it assigns to `global.logger` automatically.
logger (dev version)
var logger = require('atma-logger/lib/logger-dev');
require('atma-logger/dev');
Dev version is not minified; path must include `/lib/`.

Shows basic usage: require, optional file transport config, log/warn/error calls, and scoped logger creation.

var logger = require('atma-logger'); // Optional configuration logger.cfg({ color: 'html', logCaller: false, logDate: 'dd.MM hh:mm', transport: { type: 'fs', extension: 'html', directory: 'logs/' } }); logger.log('Hello {0}!', 'World'); logger.warn('A warning'); logger.error('An error occurred'); // Create a scoped logger var myLog = logger.create('MyApp'); myLog('Initializing...'); myLog.debug('Debug info');
Debug
Known issues
gotchaThe 'level' in config is a number, but level constants (level_ERROR, level_WARN, etc.) are exposed on the logger object.
fix
Use logger.level_ERROR (0), level_WARN (25), level_LOG (50), level_DEBUG (75), level_TRACE (100).
affects: >=0.0.0
gotchaScoped loggers created with logger.create have their own level that overrides global level only if higher; otherwise global level wins.
fix
To force a scope to always log, set its level to a very low value like 0 in config levels.
affects: >=0.0.0
gotchaThe 'fs' transport requires a writable directory; if not writable, logs will silently fail (no error thrown).
fix
Ensure the directory exists and is writable; check Node.js file permissions.
affects: >=0.0.0
deprecatedBower support mentioned in README is deprecated; no longer maintain Bower package.
affects: >=1.0.0
gotchaThe library modifies global console object in Node when using global export; may interfere with other logging libraries.
fix
Avoid using the global export if you need compatibility with other loggers; use the standard require instead.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'atma-logger'
Package not installed or typo in require path.
fix
Run 'npm i atma-logger' and ensure require path matches as shown in docs.
logger.cfg is not a function
Logger object not properly imported; possibly used ESM import syntax.
fix
Use CommonJS require: 'var logger = require('atma-logger');'
TypeError: logger.create(...) is not a function
Trying to call a scoped logger as a function before calling create.
fix
var scopedLog = logger.create('scope'); then use scopedLog('message');
Uncaught ReferenceError: logger is not defined (browser)
Forgot to include the browser script or included wrong file.
fix
Add '<script src='lib/browser.min.js'></script>' to HTML.
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
atma-logger — npm install atma-logger · libregistry