krishnan-r / sparkmonitor

Monitor Apache Spark from Jupyter Notebook
https://krishnan-r.github.io/sparkmonitor/
Apache License 2.0
172 stars 55 forks source link

Disable logging to file? #12

Open tijlk opened 5 years ago

tijlk commented 5 years ago

In kernelextension.py and serverextension.py there are references to the sparkmonitor_kernelextension.log and sparkmonitor_serverextension.log files being created and logged to. It specifically mentions that it is for debugging the module. Can we get rid of the debug mode? These log files are cluttering all my folders... :P


    fh = logging.FileHandler("sparkmonitor_serverextension.log", mode="w")
    fh.setLevel(logging.DEBUG)
    formatter = logging.Formatter(
        "%(levelname)s:  %(asctime)s - %(name)s - %(process)d - %(processName)s - \
        %(thread)d - %(threadName)s\n %(message)s \n")
    fh.setFormatter(formatter)
    logger.addHandler(fh) ## Comment this line to disable logging to a file.```
krishnan-r commented 5 years ago

Sorry for the delay. Will fix this in the next version. (Also planning on a major rewrite.)