Closed Gurzeh closed 8 years ago
The same logs are on master
Thanks @foux So nothing changed, because I don't remember master has colored logs? And my question is "where is managed output?"
Not the answer to your last question, but to the first one : yes logs are now coloured on master, and I do think that there was a change, because I don't remember those logs from yesterday
in fact, it is not that homogenous - which is common in dev this size with that many contributors Most is printed by colored_logging_handler.py but I found other printing (for instance from event_manager.py) I keep digging in. I might try a PR so you can configure the logs. Also I wonder if they can be some file logging (other than using redirection >&x something)
Actually, there is a PR: Add clean logging functionality with some other optimalisations which is a very good start for what I was looking for.
ok, most logging logic is in: colored_logging_handler.py : method handle_event (which prints a default message if arg is empty) logging_handler.py : same
the default message is prepared by message = '{}'.format(str(data))
Expected Behavior
Usual logs
Actual Behavior
new logs, like [17:39:20] {'distance_unit': '', 'distance': '', 'current_position': (long, lat), 'last_position': (long, lat,)}
I searched for the central routine printing. I guess I found it in event_manager.py like: event_report method of event_manager or in event_handlers Am I right? Cause I would like to customize the behavior.
Your config.json (remove your credentials and any other private info)
{ "auth_service": "google", "username": "", "password": "", "location": "", "gmapkey": "", "tasks": [ { "type": "HandleSoftBan" }, { "type": "SleepSchedule", "config": { "enabled": false, "time": "23:54", "duration":"7:46", "time_random_offset": "00:24", "duration_random_offset": "00:43" } }, { "type": "CollectLevelUpReward" }, { "type": "IncubateEggs", "config": { "longer_eggs_first": true } }, { "type": "UpdateLiveStats", "config": { "enabled": false, "min_interval": 10, "stats": ["uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"], "terminal_log": true, "terminal_title": true } }, { "type": "TransferPokemon" }, { "type": "NicknamePokemon", "config": { "enabled": false, "nickname_template": "{ivpct}{iv_ads}" } }, { "type": "EvolvePokemon", "config": { "evolve_all": "none", "first_evolve_by": "cp", "evolve_above_cp": 10, "evolve_above_iv": 0.2, "logic": "or", "evolve_speed": 20, "use_lucky_egg": false } }, { "type": "RecycleItems", "config": { "item_filter": { "Pokeball": { "keep" : 150 }, "Potion": { "keep" : 10 }, "Super Potion": { "keep" : 20 }, "Hyper Potion": { "keep" : 30 }, "Revive": { "keep" : 30 }, "Razz Berry": { "keep" : 100 } } } }, { "type": "CatchVisiblePokemon" }, { "type": "CatchLuredPokemon" }, { "type": "SpinFort" }, { "type": "MoveToMapPokemon", "config": { "address": "http://localhost:5000", "max_distance": 500, "min_time": 60, "min_ball": 50, "prioritize_vips": true, "snipe": true, "snipe_high_prio_only": true, "snipe_high_prio_threshold": 600, "update_map": true, "mode": "priority", "catch": { "Alakazam": 1000, "Articuno": 1000, "Chansey": 1000, "Charizard": 1000, "Charmeleon": 1000, "Dewgong": 1000, "Ditto": 1000, "Farfetch'd": 1000, "Kabutops": 1000, "Kangaskhan": 1000, "Lapras": 1000, "Magneton": 1000, "Mew": 1000, "Mewtwo": 1000, "Moltres": 1000, "Mr. Mime": 1000, "Muk": 1000, "Primeape": 1000, "Raichu": 1000, "Rhydon": 1000, "Snorlax": 1000, "Tauros": 1000, "Zapdos": 1000,
} your config here