Menu

how to output logfile?

Help
Anonymous
2013-11-13
2013-11-14
  • Anonymous

    Anonymous - 2013-11-13

    How can i create a logfile that consists of the console output when synching, or fixing? i tried with -l log.txt but it just creates an empty logfile. i dont find anything in the manual, maybe i'm just missing it. any help would be apreciated. thanks!

     
  • Anonymous

    Anonymous - 2013-11-13

    after a bit of searching i wrote a little batchfile which puts the console output into a textfile and copies it to my lof folder. for anyone who's interested i'll pate it below. you can also alter it to any command like fix or scrub, always works the same.

    the filename will look like that: synclog_11-13-2013.txt
    some of you will have to play with the date settings because different date formats mean different output. the example below works if your date is like that: 13.11.2013

    @echo off

    set date="%date:~3,2%-%date:~0,2%-%date:~6,4%"
    set target="C:\snapraid\logs"

    cd "C:\snapraid"
    snapraid -v > synclog_%date%.txt sync
    copy synclog.txt %target%
    del synclog
    .txt

    €: in the last two lines after synclog comes a wildcard, doesn't show for me here.

     

    Last edit: Anonymous 2013-11-13
  • Elpee

    Elpee - 2013-11-14

    FYI

    This line doesn't work in 5.0 SnapRAID version.

    snapraid -v > synclog_%date%.txt sync

     
  • Andrea Mazzoleni

    Hi cpl183,

    Likely you should put the > FILE as the end of the line. Like:

    snapraid -v sync > synclog_%date%.txt

    Anyway, with SnapRAID 5.0 the -l, --log option is going to output a lot of info, and not only errors.

    Ciao,
    Andrea

     

Log in to post a comment.

MongoDB Logo MongoDB