![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
log-gen
Advanced tools
Readme
This is a configurable script for generating dummy log file output.
The script can be used by the CLI command log-gen
. This expects three arguments, an interval, set of amounts and a line format.
For example if you want to generate 5 lines every second (1000ms), where the line contains a random sentence with between 10 and 20 words, you would use this command:
log-gen -i 1000 -a [5] -f "{lorem(10,20)}"
To understand the timing parameters and generator syntax more, read the following two sections.
This script simply sends all of its output to stdout. So to capture it as an actual log file you can simply redirect the stdout using >
or >>
. For example:
log-gen -i 1000 -a [5] -f "{lorem(10,20)}" > ./MyLogFile.log
You can specify an interval and a set of amounts of lines to be generated throughout that interval.
For example with an interval of "1000" (ms, so 1 second) and an amounts set of "[2,5]", two lines will be output randomly within the first second and five lines will be output within the next second. This repeats until the process is killed.
-i 1000 -a [10]
-i 1000 -a [10,50]
-i 1000 -a [80,80,80,80,500]
Within the given format argument you can use the generator syntax to produce randomly created content for each line. This format is {name(some,parameters)}
, where name is one of the predefined (below) generator functions and the parameters are a comma-separated list of parameters to be passed to the function.
Generator functions are quite simple JavaScript functions, so if you think of one that should be added, feel free to raise an issue or PR on GitHub to suggest it.
{date(format)}
- The date at time of the line output, formatted based on the parameter{ip()}
- Generates an IP address{choices(some,options)}
- Randomly selects one of the parameters passed{range(min,max)}
- Generates a number in the range min..max{lorem(min,max)}
- Generates a sentence with an amount of words based on min and max{camel(min,max)}
- Generates a list of words formatted in PascalCase. Min and max effects the amount of words output.{pascal(min,max)}
- Generates a list of words formatted in camelCase. Min and max effects the amount of words output.FAQs
This is a configurable script for generating dummy log file output.
The npm package log-gen receives a total of 0 weekly downloads. As such, log-gen popularity was classified as not popular.
We found that log-gen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.