On Thu, Jun 27, 2013 at 2:14 PM, Trevor Cooper <[email protected]> wrote:

> I'm writing an automated daily scan script and I can't seem to get NO
> output
> from clamscan if/when nothing of interest is found. For example, executing
> with...
>
>     "$CLAMSCAN_BIN" --quiet --no-summary --infected --stdout
> --file-list="$FILE_LIST" --log="$LOG_FILE"
>
> Produces the following in the $LOG_FILE...
>
>
> -------------------------------------------------------------------------------
>
> Once for 'each' invocation of clamscan.
>
> Is there way to disable this?
>
> Thanks,
> Trevor
>
>
> --
> Trevor Cooper, M.Sc.
> Data Systems Programmer / System Administrator
> University of California, San Diego
> Multimodal Imaging Laboratory
> 8950 Villa La Jolla Dr., Suite C101
> La Jolla, CA 92037
> Phone: (858) 822-4330
> Fax:   (858) 534-1078
>
> _______________________________________________
> Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
> http://www.clamav.net/support/ml
>

Not without changing the code. clamscan is printing that line when it
initializes the logger as an immediate confirmation that the logger is
working. clamdscan does the same.

If you want to eliminate that line, you can comment out line 136 through
140 in clamscan.c and recompile. Those lines look like this:


if(logg("#\n-------------------------------------------------------------------------------\n\n"))
{
            mprintf("!Problem with internal logger.\n");
            optfree(opts);
            return 2;
        }

Of course, this change will make logger issues harder to pin down, so
beware.

Dave R.

-- 
---
Dave Raynor
Sourcefire Vulnerability Research Team
[email protected]
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to