Hi, The backslash is the culprit. Will be fixed in the next release. Thanks for spotting this. Meanwhile you should be able to extract the filename with a regexp: if file_name() =~ /\([^\]+)$/ $basename = $1; (Untested, so not sure whether I got the above right)
Regards, Botond On Mon, 17 Jun 2013 14:15:32 +0000 Marvin Nipper <[email protected]> wrote: > I wanted to get the base file name for something on Windows Server 2008, so > that I could pass that along in the log entry being generated. I was testing > using an IIS server (just because it's easy to generate logs). I had > initially been using file_name(), which was giving me this: > c:\inetpub\logs\LogFiles\W3SVC\u_ex130617.log > > So then I added the xm_fileop Extension, and used this: > file_basename(file_name()) > > However, this generated exactly the same, fully-qualified file name that I'd > previously been getting. I know that the example cited in the manual showed > a Unix (forward slashes) file name being extracted, so I'm not sure if it is > the backslashes that are causing the problem, or something else that I'm > doing wrong? > > Any thoughts would be appreciated. Thanks! > > Marvin Nipper > Information Security Engineer > CIS - Operations - Global Security Defense > Corporate Information Security > Western Union > [email protected] > Phone: 720-332-1242 > Mobile: 303-489-7939 > > > The information transmitted, including any content in this communication is > confidential, is intended only for the use of the intended recipient and is > the property of The Western Union Company or its affiliates and subsidiaries. > If you are not the intended recipient, you are hereby notified that any use > of the information contained in or transmitted with the communication or > dissemination, distribution, or copying of this communication is strictly > prohibited. If you have received this communication in error, please notify > the Western Union sender immediately by replying to this message and delete > the original message > ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ nxlog-ce-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users
