Hi,

On Sat, 7 Dec 2013 09:44:08 -0200
Ricardo Brandão <rbrandao...@gmail.com> wrote:

> I had the hope I could do:
> 
> <Output fileout1>
>       Module om_file
>       file "/var/log/nxlog/"
> </Output>
> 
> Just this... And all file that nxlog receives put automatically on
> /var/log/nxlog/ directory.

You can do this, but this must be explicitly configured. NXLog does not
send files. It sends events, where events come from a log source (=Input
module), and file is only one such event source.

Here is what you need to do:
* client side:
<Input f>
   Module im_file
   Exec $Message = raw_event; $FileName = f->file_name();
</Input>

* server side:

<Output fileout1>
   Module om_file
   Exec $raw_event = $Message;   
   File "/var/log/" + file_basename($FileName)
# This will preserve the original path but this is dangerous:
#   File $FileName
</Output>

Note that to transmit fields you must send in a structured format such as
JSON or NXLog's Binary format, otherwise $FileName and $Message will not
be sent by the client.

Probably this partially answers Larry's question as well.


Regards,
Botond

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users

Reply via email to