0

In the docs of log4js for creating a config file:

{
  "appenders": [
    {
      "type": "file",
      "filename": "relative/path/to/log_file.log",

      "maxLogSize": 20480, /* Unit ?? */

      "backups": 3,
      "category": "relative-logger"
    },
    {
      "type": "file",
      "absolute": true,
      "filename": "/absolute/path/to/log_file.log",


       "maxLogSize": 20480, /* Unit ?? */

      "backups": 10,
      "category": "absolute-logger"          
    }
  ]

Does anyone know what is the unit of measurement is being used for the option "maxLogSize"?

I think this is in KB since,

20480 / 1024 = 20 MB ??

and because I think it is not a good idea to have a file up to 20 GB since it can not get opened in note pad when it reaches that file size.

But I would still want to be sure about the unit used here as it is very helpful to be precise.

I checked the wiki but I can't seem to find any mentions about it.

leonard.javiniar
  • 539
  • 8
  • 25

1 Answers1

1

it's in bytes.

but I believe there is a bug when it's large number.

Muayyad Alsadi
  • 1,506
  • 15
  • 23