403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /opt/push-server/node_modules/logform/examples/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /opt/push-server/node_modules/logform/examples/padLevels.js
const { format } = require('../');
const { combine, padLevels, simple } = format;

const { MESSAGE } = require('triple-beam');

const paddedFormat = combine(
  padLevels({
    // Uncomment for a custom filler for the padding, defaults to ' '.
    // filler: 'foo',
    // Levels has to be defined, same as `winston.createLoggers({ levels })`.
    levels: {
      error: 0,
      warn: 1,
      info: 2,
      http: 3,
      verbose: 4,
      debug: 5,
      silly: 6
    }
  }),
  simple()
);

const info = paddedFormat.transform({
  level: 'info',
  message: 'This is an info level message.'
});
const error = paddedFormat.transform({
  level: 'error',
  message: 'This is an error level message.'
});
const verbose = paddedFormat.transform({
  level: 'verbose',
  message: 'This is a verbose level message.'
});

console.dir(info[MESSAGE]);
console.dir(error[MESSAGE]);
console.dir(verbose[MESSAGE]);

Youez - 2016 - github.com/yon3zu
LinuXploit