> For the complete documentation index, see [llms.txt](https://syslog-macos-testing.gitbook.io/syslog-macos-testing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://syslog-macos-testing.gitbook.io/syslog-macos-testing/modules/affile/wildcard_file-source-driver.md).

# wildcard\_file() Source Driver

The wildcard-file() source collects log messages from multiple plain-text files from multiple directories.The syslog-ng OSE application notices if a file is renamed or replaced with a new file.

### Status

| Architecture | Status |
| :----------: | :----: |
|      x86     |  Works |
|      ARM     |  Works |

### Important Information

When syslog-ng OSE is restarted, it records the position of the last sent log message in the persist file, and continues to send messages from this position after the restart. The location of the persist file depends on the package you installed syslog-ng OSE from.&#x20;

### How to test

To test the wildcard\_file source driver, we will use it to display the contents of multiple files that we create. Steps taken will be demonstrated in the proof images.&#x20;

#### Configuration File Used

```
@version: 3.31
@include "scl.conf"

source s_files {
    wildcard-file(
        base-dir("/Users/yash/Documents")
        filename-pattern("*.txt")
        recursive(no)
        follow-freq(1)
    );
};

destination console{
    file(/dev/stdout);
};

log {
    source(s_files);
    destination(console);
};
```

#### Proof

![Testing wildcard\_file() with macOS (x86)](https://3267548193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MaZdBoDvCx_0JwOUICk%2F-Mc94-0ZOWWx-9t1Hd9j%2F-McABZs2oAujiCzgUqW6%2FScreenshot%202021-06-14%20at%206.39.54%20PM.png?alt=media\&token=68f2a1bb-6c05-4e7a-bde6-0c31888e425e)

![Testing wildcard\_file() with macOS (ARM)](https://3267548193-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MaZdBoDvCx_0JwOUICk%2F-MhXfp6utMsNE9_-xfVe%2F-MhXlDfHdCOZEPtsVfh9%2FScreen%20Shot%202021-08-20%20at%2011.51.53%20AM.png?alt=media\&token=6d150314-18d3-4cc9-a084-48df2f106c43)
