• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

variablesoftware / logface / 15371407231

01 Jun 2025 05:16AM UTC coverage: 91.974% (+0.5%) from 91.47%
15371407231

push

github

px
✨ fix: (config): add new logface configuration with emoji sets and randomization

256 of 293 branches covered (87.37%)

Branch coverage included in aggregate %.

443 of 467 relevant lines covered (94.86%)

33.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/core/createLogWithOptions.ts
1
/**
2
 * Create a logger instance with custom behavior scoped to a given tag or config.
3
 * @param options - Log options to apply to all methods of the returned logger
4
 * @returns An object with log methods bound to the provided options
5
 * @public
6
 */
7
import { emitLog, setLogLevel, getLogLevel } from "./emitLog.js";
1✔
8
import type { LogOptions } from "../types/Logger";
9

10
export function createLogWithOptions(options: LogOptions) {
1✔
11
  return {
67✔
12
    debug: (...args: unknown[]) => emitLog("debug", args, options),
67✔
13
    info: (...args: unknown[]) => emitLog("info", args, options),
67✔
14
    warn: (...args: unknown[]) => emitLog("warn", args, options),
67✔
15
    error: (...args: unknown[]) => emitLog("error", args, options),
67✔
16
    log: (...args: unknown[]) => emitLog("log", args, options),
67✔
17
    /**
18
     * Idiomatic setter for global log level (for consistency with log.setLevel)
19
     */
20
    setLevel: (level: import("../types/Logger").RuntimeLogLevel) => {
67✔
21
      setLogLevel(level);
2✔
22
    },
2✔
23
    /**
24
     * Idiomatic getter for global log level
25
     */
26
    getLevel: () => {
67✔
27
      return getLogLevel();
2✔
28
    },
2✔
29
  };
67✔
30
}
67✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc