[GeckoConverter] fix logger
This commit is contained in:
parent
76657315b3
commit
41aa12ea73
1 changed files with 20 additions and 11 deletions
|
@ -9,7 +9,15 @@
|
|||
"source": [
|
||||
"import logging\n",
|
||||
"import struct\n",
|
||||
"logger = logging.getLogger('Gecko')"
|
||||
"import sys\n",
|
||||
"# setup logger: stdout(<WARN), stderr(>=WARN)\n",
|
||||
"logger = logging.getLogger('Gecko')\n",
|
||||
"h = logging.StreamHandler(sys.stdout)\n",
|
||||
"h.addFilter(lambda r: r.levelno < logging.WARN)\n",
|
||||
"logger.addHandler(h)\n",
|
||||
"h = logging.StreamHandler()\n",
|
||||
"h.setLevel(logging.WARN)\n",
|
||||
"logger.addHandler(h)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -327,7 +335,16 @@
|
|||
"execution_count": 7,
|
||||
"id": "2a1645b1-0fa7-4603-b39f-c79ec42fd34c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"041AE6B0: Unknown symbol: render__22TBathWaterFlatRendererFPQ26JDrama9TGraphicsRC12TBathtubDataPP10TBathWaterPP16TBathWaterParamsi\n",
|
||||
"041AE6B0: Unknown symbol: render__22TBathWaterFlatRendererFPQ26JDrama9TGraphicsRC12TBathtubDataPP10TBathWaterPP16TBathWaterParamsi\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"logger.setLevel(logging.WARN)\n",
|
||||
"\n",
|
||||
|
@ -337,7 +354,7 @@
|
|||
" gecko = f.read()\n",
|
||||
"\n",
|
||||
"# convert the code from US to JP\n",
|
||||
"ans = convertGecko(gecko, symLsts['US'], symMaps['JP'], knownAddrs={\n",
|
||||
"ans = convertGecko(gecko, symLsts['US'], symMaps['EU'], knownAddrs={\n",
|
||||
" 0x800003E0,\n",
|
||||
" 0x800003E4,\n",
|
||||
" 0x800003E8,\n",
|
||||
|
@ -367,14 +384,6 @@
|
|||
"win32clipboard.CloseClipboard()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "ae9de60e-db13-4641-b16b-56ba9ed9c028",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
|
|
Reference in a new issue