vdusnoki Absent Member.
Absent Member.
882 views

Can we access the file name pattern of a File Connector ?

Hi,

It is a way to access the value of the file name pattern used on an Event Source connected to a File Connector from inside the Collectors parse method ? I need this because I have 5 different applications that delivers log events in csv files(they have the same format) but they are missing the information about the application itself. That information I can find from the name(the pattern to be more precise) of the csv file used. This way I can use 1 collector with one File Connector and 5 Event Sources instead of using 5 Collectors.

Thanks,
Viki
0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

Re: Can we access the file name pattern of a File Connector ?

On 21.02.2017 09:26, vdusnoki wrote:
>
> Hi,
>
> It is a way to access the value of the file name pattern used on an
> Event Source connected to a File Connector from inside the Collectors
> parse method ? I need this because I have 5 different applications that
> delivers log events in csv files(they have the same format) but they are
> missing the information about the application itself. That information I
> can find from the name(the pattern to be more precise) of the csv file
> used. This way I can use 1 collector with one File Connector and 5 Event
> Sources instead of using 5 Collectors.


Records from the file connector have a "CurrentFile" property which has
the full path the file the line was read from.


--
Norbert
0 Likes
vdusnoki Absent Member.
Absent Member.

Re: Can we access the file name pattern of a File Connector

Many thanks Norbert!

Maybe you now also how to access the value of the current offset in the file (because DEVICE_OFFSET that is mentioned in the documentation is undefined) ?

Viki
0 Likes
brandon-langley Absent Member.
Absent Member.

Re: Can we access the file name pattern of a File Connector

vdusnoki;2451383 wrote:
Many thanks Norbert!

Maybe you now also how to access the value of the current offset in the file (because DEVICE_OFFSET that is mentioned in the documentation is undefined) ?

Viki


Why would you try to access the offset of the file?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.