Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve LogConfig.xml #666

Open
ljamt opened this issue Nov 9, 2021 · 2 comments
Open

Improve LogConfig.xml #666

ljamt opened this issue Nov 9, 2021 · 2 comments
Labels
discussion needed Let's have a discussion about this enhancement New feature or request

Comments

@ljamt
Copy link
Member

ljamt commented Nov 9, 2021

LogConfig is for listing variables to log.

<simulators>
    <simulator name="sim1">
        <variable name="var1"/>
        <variable name="var2"/>
    </simulator>
    <simulator name="sim2">
        <variable name="var1"/>
        <variable name="var2"/>
    </simulator>
</simulators>

A common use case is to omit all variables with causality parameter. Using LogConfig.xml for this you would have to add all variables that is not paramters.

What would be the best format to allow for this functionality?

<simulators>
    <simulator name="sim1">
        <omit>
            <causality name="parameter"/>
            <variable name="var3"/>
        </omit>
    </simulator>
</simulators>
<simulators>
    <simulator name="sim1" omit-causalities="parameter">
    	<variable name="var1"/>
	</simulator>
</simulators>
@ljamt ljamt added enhancement New feature or request discussion needed Let's have a discussion about this labels Nov 9, 2021
@kyllingstad
Copy link
Member

I agree that this would be a nice feature. Of the two suggested schemas, I prefer the first one. But just to complicate matters, let me throw a third one into the mix. ;)

<simulators>
    <!-- Selection mode "include" works like today; it includes only the specified
        variables and categories. It is also the default, for backwards compatibility. -->
    <simulator name="sim1" selection-mode="include">
        <variable name="var1"/>
        <variable name="var2"/>
        <causality name="output"/>
    </simulator>
    <!-- Selection mode "exclude" is the opposite; it includes everything *except*
        the specified variables and categories. -->
    <simulator name="sim2" selection-mode="exclude">
        <variable name="var3"/>
        <causality name="parameter"/>
    </simulator>
</simulators>

@ljamt
Copy link
Member Author

ljamt commented Nov 10, 2021

Actually you are not complicating matters. I realized that we either have to include or exclude variables, but couldn't find a suitable format for this. Your suggestion looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed Let's have a discussion about this enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants