def main():
    salt_vars = get_salt_vars()

    def salt_outputter(value):
        '''
        Use Salt's outputters to print values to the shell
        '''
        if value is not None:
            builtins._ = value
            salt.output.display_output(value, '', salt_vars['__opts__'])

    sys.displayhook = salt_outputter

    # Set maximum number of items that will be written to the history file
    readline.set_history_length(300)

    if os.path.exists(HISTFILE):
        readline.read_history_file(HISTFILE)

    atexit.register(savehist)
    atexit.register(lambda: sys.stdout.write('Salt you later!\n'))

    saltrepl = InteractiveConsole(locals=salt_vars)
    saltrepl.interact(banner=__doc__)
Defaults to set up logging to a file.
dataset/ETHPy150Open saltstack/salt/tests/saltsh.py/main--crossover with--dataset/ETHPy150Open jumoconnect/openjumo/jumodjango/utils/base_daemon.py/get_logger