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

Error output in app.run(main) #83

Open
12343954 opened this issue Feb 25, 2020 · 0 comments
Open

Error output in app.run(main) #83

12343954 opened this issue Feb 25, 2020 · 0 comments

Comments

@12343954
Copy link

12343954 commented Feb 25, 2020

image

duplicate rows show out, what can i do? thank you

from absl import app, flags
import coloredlogs
import logging


def main(_args):
    logger = logging.getLogger(__name__)
    coloredlogs.install(level='DEBUG', logger=logger,
                        fmt='%(asctime)s [%(filename)s:%(lineno)d] %(levelname)-8s %(message)s',
                        # datefmt='%Y-%m-%d %H:%I:%S',
                        datefmt='%H:%I:%S',
                        isatty=True
                        )

    logger.info("this is an informational message")
    logger.warning("this is an informational message")
    logger.fatal("this is an informational message")
    logger.error("this is an informational message")
    logger.debug(logger.__dir__)


if __name__ == "__main__":
    try:
        app.run(main)
        # main(1)
    except Exception as ex:
        print(ex)
    except SystemExit:
        pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant