logging.debug, logging.critical 질문

조회수 965회

logging.debuglogging.critical을 사용해서 기록을 text에 넣었는데 이렇게 뜨네요. 이걸 보다보면

2021-05-09 16:31:18,331 - DEBUG -  <@615644889945735187> mentioned 'Hi' to Pal 

라고 제가 원하던게 뜨긴뜨는데, 나머지 알수 없는 것들은 text에서 없어졌으면 하는데 뭐가 문제 인가요? 그냥 어쩔수 없는 부분인가요?


2021-05-09 16:31:11,119 - DEBUG -  on_message has successfully been registered as an event
2021-05-09 16:31:11,120 - CRITICAL -  The program is unable to recover!
2021-05-09 16:31:11,120 - INFO -  logging in using static token
2021-05-09 16:31:11,423 - DEBUG -  GET https://discord.com/api/v7/users/@me with None has returned 200
2021-05-09 16:31:11,424 - DEBUG -  GET https://discord.com/api/v7/users/@me has received {'id': '839431236857495552', 'username': 'Pal', 'avatar': '1beaed9a38b1dbfa92196c56d1cd76e9', 'discriminator': '1737', 'public_flags': 0, 'flags': 0, 'bot': True, 'locale': 'en-US', 'mfa_enabled': False, 'email': None, 'verified': True}
2021-05-09 16:31:11,438 - DEBUG -  GET https://discord.com/api/v7/gateway with None has returned 200
2021-05-09 16:31:11,438 - DEBUG -  GET https://discord.com/api/v7/gateway has received {'url': 'wss://gateway.discord.gg'}
2021-05-09 16:31:11,674 - DEBUG -  Created websocket connected to wss://gateway.discord.gg?encoding=json&v=6&compress=zlib-stream
2021-05-09 16:31:11,674 - DEBUG -  Dispatching event socket_raw_receive
2021-05-09 16:31:11,674 - DEBUG -  For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 10, 'd': {'heartbeat_interval': 41250, '_trace': ['["gateway-prd-main-4h9p",{"micros":0.0}]']}}
2021-05-09 16:31:11,674 - DEBUG -  Dispatching event socket_response
2021-05-09 16:31:11,674 - DEBUG -  Dispatching event socket_raw_send
2021-05-09 16:31:11,675 - DEBUG -  Dispatching event socket_raw_send
2021-05-09 16:31:11,675 - INFO -  Shard ID None has sent the IDENTIFY payload.
2021-05-09 16:31:11,861 - DEBUG -  Dispatching event socket_raw_receive
2021-05-09 16:31:11,861 - DEBUG -  For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
2021-05-09 16:31:11,861 - DEBUG -  Dispatching event socket_response
2021-05-09 16:31:11,937 - DEBUG -  Dispatching event socket_raw_receive
2021-05-09 16:31:11,938 - DEBUG -  For Shard ID None: WebSocket Event: {'t': 'READY', 's': 1, 'op': 0, 'd': {'v': 6, 'user_settings': {}, 'user': {'verified': True, 'username': 'Pal', 'mfa_enabled': False, 'id': '839431236857495552', 'flags': 0, 'email': None, 'discriminator': '1737', 'bot': True, 'avatar': '1beaed9a38b1dbfa92196c56d1cd76e9'}, 'session_id': 'c9f35934cd986a543d14bb8e28f37b11', 'relationships': [], 'private_channels': [], 'presences': [], 'guilds': [{'unavailable': True, 'id': '839432932870324254'}], 'guild_join_requests': [], 'geo_ordered_rtc_regions': ['south-korea', 'japan', 'hongkong', 'singapore', 'india'], 'application': {'id': '839431236857495552', 'flags': 303104}, '_trace': ['["gateway-prd-main-4h9p",{"micros":60365,"calls":["discord-sessions-prd-2-89",{"micros":56727,"calls":["start_session",{"micros":52214,"calls":["api-prd-main-rrfs",{"micros":49086,"calls":["get_user",{"micros":2876},"add_authorized_ip",{"micros":5291},"get_guilds",{"micros":7357},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":3977,"calls":[]}]}]}]']}}
2021-05-09 16:31:11,938 - DEBUG -  Dispatching event socket_response
2021-05-09 16:31:11,938 - INFO -  Shard ID None has connected to Gateway: ["gateway-prd-main-4h9p",{"micros":60365,"calls":["discord-sessions-prd-2-89",{"micros":56727,"calls":["start_session",{"micros":52214,"calls":["api-prd-main-rrfs",{"micros":49086,"calls":["get_user",{"micros":2876},"add_authorized_ip",{"micros":5291},"get_guilds",{"micros":7357},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":3977,"calls":[]}]}]}] (Session ID: c9f35934cd986a543d14bb8e28f37b11).
2021-05-09 16:31:11,952 - DEBUG -  Dispatching event connect
2021-05-09 16:31:11,953 - DEBUG -  Dispatching event socket_raw_receive
2021-05-09 16:31:11,953 - DEBUG -  For Shard ID None: WebSocket Event: {'t': 'GUILD_CREATE', 's': 2, 'op': 0, 'd': {'default_message_notifications': 0, 'unavailable': False, 'max_video_channel_users': 25, 'members': [{'user': {'username': 'Pal', 'id': '839431236857495552', 'discriminator': '1737', 'bot': True, 'avatar': '1beaed9a38b1dbfa92196c56d1cd76e9'}, 'roles': ['839433077024882688'], 'mute': False, 'joined_at': '2021-05-05T09:27:21.493000+00:00', 'hoisted_role': None, 'deaf': False}], 'nsfw_level': 0, 'stage_instances': [], 'nsfw': False, 'premium_tier': 0, 'public_updates_channel_id': None, 'rules_channel_id': None, 'member_count': 2, 'lazy': True, 'premium_subscription_count': 0, 'large': False, 'name': 'Python Bot Test', 'joined_at': '2021-05-05T09:27:21.493000+00:00', 'discovery_splash': None, 'afk_channel_id': None, 'max_members': 100000, 'vanity_url_code': None, 'banner': None, 'application_id': None, 'afk_timeout': 300, 'owner_id': '615644889945735187', 'voice_states': [], 'mfa_level': 0, 'presences': [], 'preferred_locale': 'en-US', 'description': None, 'features': [], 'system_channel_id': '839432932870324257', 'roles': [{'position': 0, 'permissions_new': '6546771521', 'permissions': 104320577, 'name': '@everyone', 'mentionable': False, 'managed': False, 'id': '839432932870324254', 'hoist': False, 'color': 0}, {'tags': {'bot_id': '839431236857495552'}, 'position': 1, 'permissions_new': '8', 'permissions': 8, 'name': 'Pal', 'mentionable': False, 'managed': True, 'id': '839433077024882688', 'hoist': False, 'color': 0}], 'explicit_content_filter': 0, 'guild_hashes': {'version': 1, 'roles': {'omitted': False, 'hash': '8ES/b4YLYvI'}, 'metadata': {'omitted': False, 'hash': 'Uiak5ExAkcY'}, 'channels': {'omitted': False, 'hash': 'fj/te7TBFDg'}}, 'emojis': [], 'icon': None, 'system_channel_flags': 0, 'region': 'south-korea', 'verification_level': 0, 'threads': [], 'id': '839432932870324254', 'splash': None, 'channels': [{'type': 4, 'position': 0, 'permission_overwrites': [], 'name': 'Text Channels', 'id': '839432932870324255'}, {'type': 4, 'position': 0, 'permission_overwrites': [], 'name': 'Voice Channels', 'id': '839432932870324256'}, {'type': 0, 'topic': None, 'rate_limit_per_user': 0, 'position': 0, 'permission_overwrites': [{'type': 'role', 'id': '839432932870324254', 'deny_new': '0', 'deny': 0, 'allow_new': '65536', 'allow': 65536}], 'parent_id': '839432932870324255', 'nsfw': False, 'name': 'general', 'last_message_id': '840850090930995220', 'id': '839432932870324257'}, {'user_limit': 0, 'type': 2, 'rtc_region': None, 'position': 0, 'permission_overwrites': [], 'parent_id': '839432932870324256', 'name': 'General', 'id': '839432932870324258', 'bitrate': 64000}]}}
2021-05-09 16:31:11,953 - DEBUG -  Dispatching event socket_response
2021-05-09 16:31:11,954 - DEBUG -  Dispatching event guild_available
2021-05-09 16:31:13,965 - DEBUG -  Dispatching event ready
2021-05-09 16:31:18,330 - DEBUG -  Dispatching event socket_raw_receive
2021-05-09 16:31:18,330 - DEBUG -  For Shard ID None: WebSocket Event: {'t': 'MESSAGE_CREATE', 's': 3, 'op': 0, 'd': {'type': 0, 'tts': False, 'timestamp': '2021-05-09T07:31:17.628000+00:00', 'referenced_message': None, 'pinned': False, 'nonce': '840853421710901248', 'mentions': [], 'mention_roles': [], 'mention_everyone': False, 'member': {'roles': [], 'mute': False, 'joined_at': '2021-05-05T09:26:47.110000+00:00', 'hoisted_role': None, 'deaf': False}, 'id': '840853419996086313', 'flags': 0, 'embeds': [], 'edited_timestamp': None, 'content': '#Hi', 'components': [], 'channel_id': '839432932870324257', 'author': {'username': 'olskee', 'public_flags': 0, 'id': '615644889945735187', 'discriminator': '1822', 'avatar': None}, 'attachments': [], 'guild_id': '839432932870324254'}}
2021-05-09 16:31:18,331 - DEBUG -  Dispatching event socket_response
2021-05-09 16:31:18,331 - DEBUG -  Dispatching event message
2021-05-09 16:31:18,331 - DEBUG -  <@615644889945735187> mentioned 'Hi' to Pal
2021-05-09 16:31:18,575 - DEBUG -  Dispatching event socket_raw_receive
2021-05-09 16:31:18,575 - DEBUG -  For Shard ID None: WebSocket Event: {'t': 'MESSAGE_CREATE', 's': 4, 'op': 0, 'd': {'type': 0, 'tts': False, 'timestamp': '2021-05-09T07:31:17.909000+00:00', 'referenced_message': None, 'pinned': False, 'mentions': [{'username': 'olskee', 'public_flags': 0, 'member': {'roles': [], 'mute': False, 'joined_at': '2021-05-05T09:26:47.110000+00:00', 'hoisted_role': None, 'deaf': False}, 'id': '615644889945735187', 'discriminator': '1822', 'avatar': None}], 'mention_roles': [], 'mention_everyone': False, 'member': {'roles': ['839433077024882688'], 'mute': False, 'joined_at': '2021-05-05T09:27:21.493000+00:00', 'hoisted_role': None, 'deaf': False}, 'id': '840853421175341086', 'flags': 0, 'embeds': [], 'edited_timestamp': None, 'content': 'Hi <@615644889945735187>.', 'components': [], 'channel_id': '839432932870324257', 'author': {'username': 'Pal', 'public_flags': 0, 'id': '839431236857495552', 'discriminator': '1737', 'bot': True, 'avatar': '1beaed9a38b1dbfa92196c56d1cd76e9'}, 'attachments': [], 'guild_id': '839432932870324254'}}
2021-05-09 16:31:18,575 - DEBUG -  Dispatching event socket_response
2021-05-09 16:31:18,576 - DEBUG -  Dispatching event message
2021-05-09 16:31:18,593 - DEBUG -  POST https://discord.com/api/v7/channels/839432932870324257/messages with {"content":"Hi <@615644889945735187>. "} has returned 200
2021-05-09 16:31:18,593 - DEBUG -  POST https://discord.com/api/v7/channels/839432932870324257/messages has received {'id': '840853421175341086', 'type': 0, 'content': 'Hi <@615644889945735187>.', 'channel_id': '839432932870324257', 'author': {'id': '839431236857495552', 'username': 'Pal', 'avatar': '1beaed9a38b1dbfa92196c56d1cd76e9', 'discriminator': '1737', 'public_flags': 0, 'bot': True}, 'attachments': [], 'embeds': [], 'mentions': [{'id': '615644889945735187', 'username': 'olskee', 'avatar': None, 'discriminator': '1822', 'public_flags': 0}], 'mention_roles': [], 'pinned': False, 'mention_everyone': False, 'tts': False, 'timestamp': '2021-05-09T07:31:17.909000+00:00', 'edited_timestamp': None, 'flags': 0, 'components': [], 'referenced_message': None}
2021-05-09 16:31:52,937 - DEBUG -  Keeping shard ID None websocket alive with sequence 4.
2021-05-09 16:31:53,141 - DEBUG -  Dispatching event socket_raw_receive
2021-05-09 16:31:53,142 - DEBUG -  For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
2021-05-09 16:31:53,142 - DEBUG -  Dispatching event socket_response


답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)