Sometimes, a glob pattern alone is not expressive enough to capture the exact logs that should be uploaded to DataSet. Often you are required to specify a more permissive glob pattern that matches more log file names than desired. To deal with such cases, you may specify a list of glob patterns in the exclude field. Any file that matches any exclude pattern from the list will not be sent to DataSet.
For example, this configuration will copy all log files contained in the directory /var/logs/foo, but exclude those ending in a period and a series of digits (such as .1, .2, typical extensions for rotated logs):
logs: [ { path: "/var/log/foo/*", exclude: ["*.[0-9]*"] } ]
You may specify more than one exclude glob pattern.
Comments
0 comments
Please sign in to leave a comment.