Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

tokio-js/corelog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoreLog

Logs on an other level

Exmaple (TS)

import * as corelog from "@tokio-js/corelog";
import * as tru from "@tokio-js/trutrace";

corelog.init("corelogs");

function trace(msg: any) {
    const trutrace = tru.trace();
    const traces = tru.format(msg, "TRC", trutrace, new Date());
    console.log(traces[0]);
    corelog.log("CORE", traces[1]);
    corelog.log("TOP", traces[2]);
}

function add(x: number, y: number): number {
    let result = x + y;
    trace("Added " + x + " and " + y + " to get " + result);
    return result;
}

function main() {
    let result = add(1, 2);
    console.log("Result: " + result);
}

main();

About

Logs on an other level

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages