1.1.5 • Published 5 years ago

discord.xr-logger v1.1.5

Weekly downloads
3
License
Apache 4.0
Repository
-
Last release
5 years ago

discord.xr-logger

About

discord.xr-logger best logging system for terminal with txt file recording feature with terminal txt colors

Installation

PC or VDS: npm install discord.xr-logger --save Glitch: pnpm install discord.xr-logger --save

Example usage with Express

const ExpressApp = require("express")()
const Log = require("discord.xr-logger")
const logger = new Log("datas.txt", { dirname: "enter your dirname" }) //if not saving loggers file blank it Ex: *new Log()*

ExpressApp.listen(process.env.PORT, function () {
    logger.info("ExpressApp Succesfully started!")
})

ExpressApp.get("/", function (req, res) {
    logger.info("Someone entered ExpressApp")
})

with Any control

const Log = require("discord.xr-logger")
const logger = new Log("datas.txt", { dirname: "enter your dirname" }) //if not saving loggers file blank it Ex: *new Log()*

logger.create("info type logger!", { type: "info" })
logger.info("info type logger!")
logger.warn("warn type logger!")
logger.error("error type logger!")
logger.debug("debug type logger!")
logger.log("classic log type logger!")
logger.success("success type logger!")
//other settings?
logger.info("Data file not saving info type logger!", { saveTxt: false })
logger.create("Data file not saving info type logger!", { type: "info", saveTxt: false })

How to use tick and cross?

using this discord.xr-logger function here example code!

const Log = require("discord.xr-logger")
const logger = new Log("datas.txt", { dirname: "enter your dirname" }) //if not saving loggers file blank it Ex: *new Log()*

logger.info(`hello i'm info tick message! ${logger.tick()}`)
logger.error(`hello i'm error cross message! ${logger.cross()}`)

Make your own Custom Loggers!

1.1.4 new update! " Custom Logger! and Custom Logger text color! "

make your own discord.xr-logger logger! example code!

How create Custom Logger?

const Custom = require("discord.xr-logger/extra/customLog")

class Progress extends Custom {
    constructor() {
        super()

        this.logName = "" //enter your custom logger name! ex: "PROGRESS" *dont forget on caps lock*
        this.dirname = "" //enter your saving data file dirname *if your logger not saving datas? blank it here*
        this.filename = "" //enter your saving data file filename *if your logger not saving datas? blank it here*
        this.hexColor = "" //custom text color! *enter hexColor code and done! Ex: #027FF*
    }
}

module.exports = {
    Progress
}

How to use My custom logger

using your own discord.xr-logger logger example code!

const { Progress } = require("") //enter your custom logger javascript file name. ex: /lib/Custom

let log = new Progress()

log.send("hello i'm custom logger message!") //and done!

Links

1.1.5

5 years ago

1.1.4

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago