[](https://badge.fury.io/js/%40alu0101265704%2Faddlogging)
npm install @alu0101265704/addlogging
addlogging method, which from a given JavaScript function,adds logging messages before the entire code declaration begins.* API Documentation
* Installation
* Usage
* Importing it to the project
* Options
* Tests
* Contributing
console
npm install -g @alu0101265704/addlogging
`$3
`console
npm install @alu0101265704/addlogging
`Usage
$3
For the module to be used, you will only need it to be imported into your development project, like for example:`console
const test = require('@alu0101265704/addlogging');
...
const result = test.addLogging(inputCode, patternName);
...
`$3
IMPORTANT: If you want to execute directly from your command line, you must have installed this package as globally in your system, in that case you be able to execute
add-logging with differents arguments as follows:*
add-logging -h, --help Using the option
help, will show how many options you will be able to use with the executable and how it works.
`console
add-logging -hUsage: add-logging add-logging [options]
Options:
-V, --version output the version number
-o, --output output file of the program
-p, --pattern function pattern name and output file of the program
-h, --help display help for command
`*
add-logging -V, --versionUsing the option
version, will show the version of the module.
`console
add-logging --version1.1.2
`*
add-logging -p, --patternUsing the option
pattern followed by a pattern name (string), output file path and input file path, the program will be executed but only by adding lines in those functions which are the same as the pattern name, and finally write those results in the output file.
`console
add-logging -p 'multiply' output/output.js input/input1.js Output in file 'output/output.js
`*
add-logging -o, --outputUsing the option
output followed by the output file path and the input file path, the program will be executed as usual, that is to say, will add a log
message into the function and write the result in the output file.
`console
add-logging --output output/output.js input/input1.js Output in file 'output/output.js'
``