Hi, thank you for replying. I have tried your options and i still get:

ERROR assignment failed at line 53, character 33 in C:\Program Files
(x86)\nxlog\conf\nxlog.conf. statement execution has been aborted; function
'file_name' failed at line 53, character 31 in C:\Program Files
(x86)\nxlog\conf\nxlog.conf. expression evaluation has been aborted; ###
ASSERTION FAILED at line 38 in
im_file_funcproc_cb.c/nx_expr_func__im_file_file_name(): "modconf->currsrc
!= NULL" ###

Even at run time it does not like" Exec $MyFileName = (file_name())".  Just
cant seem to get it to work.

Thank you,

Chris


On Wed, Jun 18, 2014 at 6:26 PM, <
[email protected]> wrote:

> Send nxlog-ce-users mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users
> or, via email, send a message with subject or body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of nxlog-ce-users digest..."
>
>
> Today's Topics:
>
>    1. Output File Path (ken delaney)
>    2. Output Module File Path (ken delaney)
>    3. Re: Output Module File Path (Marvin Nipper)
>    4. Re: Windows NX Log file_name() Not Working (Botond Botyanszki)
>    5. Re: Output Module File Path (Botond Botyanszki)
>    6. Re: Output Module File Path (ken delaney)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 18 Jun 2014 10:15:31 -0400
> From: ken delaney <[email protected]>
> Subject: [nxlog-ce-users] Output File Path
> To: [email protected]
> Message-ID:
>         <CAE5p1=CFj09=dwcdtW67exxQGhzVSHMqemB2B0sFp9=
> [email protected]>
> Content-Type: text/plain; charset="utf-8"
>
> What is the syntax for the Output  module using File statement if the
> system is Windows?  I have the following but not sure if it's correct.
>
> File
>
> --
> Phone: 540.300.5081
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 2
> Date: Wed, 18 Jun 2014 10:17:42 -0400
> From: ken delaney <[email protected]>
> Subject: [nxlog-ce-users] Output Module File Path
> To: [email protected]
> Message-ID:
>         <CAE5p1=CgGGz4-SYp2RY_oG=
> [email protected]>
> Content-Type: text/plain; charset="utf-8"
>
> What is the proper syntax for File path in the Output module on a Windows
> system?
>
> I have the following but not sure if it should be something else like
> "C:\logs\logmsg.txt":
>
> File   "/logs/logmsg.txt"
>
> Thank You
>
> smallberries
>
> --
> Phone: 540.300.5081
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 3
> Date: Wed, 18 Jun 2014 15:44:50 +0000
> From: Marvin Nipper <[email protected]>
> Subject: Re: [nxlog-ce-users] Output Module File Path
> To: ken delaney <[email protected]>,
>         "[email protected]"
>         <[email protected]>
> Message-ID:
>         <2184a9d4ece05c4cadbcdff0574f1e661ef7c...@srvwuden0402.hqintl1.com
> >
> Content-Type: text/plain; charset="utf-8"
>
> Yes? sorta like what you coded, but you have to be cautious of single vs.
> double-quotes.  Double-quotes (in any literal) allow the use of escape
> sequences, which are prefixed with (you guessed it?) backslashes, so
> certain values can be ?eaten?, messing up the resulting file name.  You can
> avoid that possible problem, by escaping each of the backslashes, but I
> tend to single-quote most Windows file name values, to ensure that I don?t
> have to mess with that (because single-quoted literals are not evaluated
> for escape sequences).  Bottom line, exactly what you have below, but
> simply bounded by single-quotes.
>
> From: ken delaney [mailto:[email protected]]
> Sent: Wednesday, June 18, 2014 8:18 AM
> To: [email protected]
> Subject: [nxlog-ce-users] Output Module File Path
>
> What is the proper syntax for File path in the Output module on a Windows
> system?
>
> I have the following but not sure if it should be something else like
> "C:\logs\logmsg.txt":
> File   "/logs/logmsg.txt"
> Thank You
> smallberries
>
> --
> Phone: 540.300.5081
>
>
> ----------------------------------------------------------------------
> 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
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 4
> Date: Wed, 18 Jun 2014 22:23:58 +0200
> From: Botond Botyanszki <[email protected]>
> Subject: Re: [nxlog-ce-users] Windows NX Log file_name() Not Working
> To: [email protected]
> Message-ID: <20140618222358.0a9da5d6@mephisto>
> Content-Type: text/plain; charset=US-ASCII
>
> Hi,
>
> The reason why this fails is because you are assigning a value to a
> field (i.e. $MyFileName = ...) inside the Schedule block where this is
> invalid. Note that dollar sign represents a field of an event data and is
> not a variable like it is in perl. The Schedule block is triggered by a
> timer and not an event data, thus there is are no fields available in
> this context.
> Perhaps it was a mistake to use the dollar sign for fields since people
> keep confusing it with variables.
> See here for more:
>
> http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html#troubleshooting_common_problems_missing_logdata
>
> What you could do is avoid using fields:
>  <Schedule>
>    ...
>    Exec log_info(file_name());
>  </Schedule>
>
> Note that while the above syntactically correct this still may not work
> since the module might close the input file by the time the timer
> executes your statement.
>
> On the other hand the following should work:
>  <Input f>
>   Module im_file
>   File ...
>   Exec $MyFileName = file_name();
>  </Input>
>
> Regards,
> Botond
>
> On Tue, 17 Jun 2014 16:52:36 -0400
> Chris <[email protected]> wrote:
>
> > Hello, I have the below in im_file. At start up, file_name() fails with
> > this generic error (ERROR Scheduled execution failed; assignment failed
> at
> > line 78, character 36 in C:\Program Files (x86)\nxlog\conf\nxlog.conf.
> > statement execution has been aborted; missing logdata, assignment
> possibly
> > after drop() . I tried outside the schedule block, tried just Exec
> > $MyFileName = file_name();, but get the same error. I can seem to get the
> > name of the current file opened. Any Ideas?
> >
> > Thank you
> >
> >
> >  <Schedule>
> > Every 30 min
> >  Exec    log_info(%LOGFILENAME%);
> > Exec log_info("I'm Up " + now()) ;
> >  #Exec $MyFileName = in2->file_name();
> > #Exec log_info($MyFileName);
> >     </Schedule>
> >
> >
> >
> > Chris
>
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 18 Jun 2014 22:30:26 +0200
> From: Botond Botyanszki <[email protected]>
> Subject: Re: [nxlog-ce-users] Output Module File Path
> To: [email protected]
> Message-ID: <20140618223026.64c08bfb@mephisto>
> Content-Type: text/plain; charset=US-ASCII
>
> Hi,
>
> You should be able to use any of the following syntax:
>  'C:\logs\logmsg.txt'
>  "C:\\logs\\logmsg.txt"
>  'C:/logs/logmsg.txt'
>
> Regards,
> Botond
>
> On Wed, 18 Jun 2014 10:17:42 -0400
> ken delaney <[email protected]> wrote:
>
> > What is the proper syntax for File path in the Output module on a Windows
> > system?
> >
> > I have the following but not sure if it should be something else like
> > "C:\logs\logmsg.txt":
> >
> > File   "/logs/logmsg.txt"
> >
> > Thank You
> >
> > smallberries
> >
> > --
> > Phone: 540.300.5081
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 18 Jun 2014 18:25:41 -0400
> From: ken delaney <[email protected]>
> Subject: Re: [nxlog-ce-users] Output Module File Path
> To: Botond Botyanszki <[email protected]>
> Cc: [email protected]
> Message-ID:
>         <CAE5p1=
> [email protected]>
> Content-Type: text/plain; charset="utf-8"
>
> Thank you
>
>
> On Wed, Jun 18, 2014 at 4:30 PM, Botond Botyanszki <[email protected]> wrote:
>
> > Hi,
> >
> > You should be able to use any of the following syntax:
> >  'C:\logs\logmsg.txt'
> >  "C:\\logs\\logmsg.txt"
> >  'C:/logs/logmsg.txt'
> >
> > Regards,
> > Botond
> >
> > On Wed, 18 Jun 2014 10:17:42 -0400
> > ken delaney <[email protected]> wrote:
> >
> > > What is the proper syntax for File path in the Output module on a
> Windows
> > > system?
> > >
> > > I have the following but not sure if it should be something else like
> > > "C:\logs\logmsg.txt":
> > >
> > > File   "/logs/logmsg.txt"
> > >
> > > Thank You
> > >
> > > smallberries
> > >
> > > --
> > > Phone: 540.300.5081
> >
> >
> >
> ------------------------------------------------------------------------------
> > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> > Find What Matters Most in Your Big Data with HPCC Systems
> > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> > Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> > http://p.sf.net/sfu/hpccsystems
> > _______________________________________________
> > nxlog-ce-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users
> >
>
>
>
> --
> Phone: 540.300.5081
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
>
> ------------------------------
>
> _______________________________________________
> nxlog-ce-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users
>
>
> End of nxlog-ce-users Digest, Vol 31, Issue 3
> *********************************************
>
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
nxlog-ce-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to