Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

how to separate logger files

Hello,

I'm new on this platform and it's my first time of experiment building.
My experiment has 3 different loop, it means 3 different conditions.
Is there anyway to get 3 different log files, one for each loop data?

I'm sorry if it was a stupid question, I'll try to improve! Thank you very much!
Viola

Comments

  • Hi Viola,
    Here is a suggestion how I would solve this issue:

    In the loop I called "Condition_1" you can create a single variable called "condition" and you specify below which condition will be realized in everything within this loop item. You could then do this for each of the conditions you want to run. In cour log-Files, you then have a variable "condition" which indicates the current condition.
    The advantage of this is that you wouldn't have to use separate loggers which could lead to some mess (been there, done that).
    I hope this helped.
    Best,
    Christian

  • Hi Viola,

    What is the reason you want to have separate logfiles? In my experience it is handier to have all data in a single file and sort out conditions later during analysis. So, I wouldn't go for multiple log files.

    Other option is that you create multiple logfiles within an inline_script. It is not very difficult, but requires some python coding. For example:

    var.o = 1
    var.a = 2
    
    log.open('/home/ede/Desktop/o.csv')
    log.write_vars(var_list=['o'])
    log.close()
    
    log.open('/home/ede/Desktop/a.csv')
    log.write_vars(var_list=['a'])
    log.close()
    

    Eduard

  • Yes, I decided to sort out conditions later during analysis. It lokks like the best option.
    Thank you very much! :)

Sign In or Register to comment.