diff --git a/indev.py b/indev.py index 2116466..7b96178 100644 --- a/indev.py +++ b/indev.py @@ -63,6 +63,9 @@ TAG_Compound "MinecraftLevel" """ from mclevelbase import * +log = logging.getLogger(__name__) +warn, error, info, debug = log.warn, log.error, log.info, log.debug + MinecraftLevel = "MinecraftLevel" Environment = "Environment" diff --git a/infiniteworld.py b/infiniteworld.py index 96a48a1..1951792 100644 --- a/infiniteworld.py +++ b/infiniteworld.py @@ -14,6 +14,9 @@ import sys import urllib import tempfile +log = logging.getLogger(__name__) +warn, error, info, debug = log.warn, log.error, log.info, log.debug + #infinite Level = 'Level' BlockData = 'BlockData' diff --git a/java.py b/java.py index 2996e31..a78f5e6 100644 --- a/java.py +++ b/java.py @@ -8,6 +8,9 @@ from mclevelbase import * import re +log = logging.getLogger(__name__) +warn, error, info, debug = log.warn, log.error, log.info, log.debug + class MCJavaLevel(MCLevel): diff --git a/level.py b/level.py index 5be488d..714adf8 100644 --- a/level.py +++ b/level.py @@ -9,6 +9,9 @@ from mclevelbase import * import tempfile from collections import defaultdict +log = logging.getLogger(__name__) +warn, error, info, debug = log.warn, log.error, log.info, log.debug + def extractLightMap(materials, blocks, heightMap = None): """Computes the HeightMap array for a chunk, which stores the lowest y-coordinate of each column where the sunlight is still at full strength.""" diff --git a/schematic.py b/schematic.py index 9e53b88..d486508 100644 --- a/schematic.py +++ b/schematic.py @@ -5,6 +5,10 @@ Created on Jul 22, 2011 ''' from mclevelbase import * import shutil + +log = logging.getLogger(__name__) +warn, error, info, debug = log.warn, log.error, log.info, log.debug + #schematic Materials = 'Materials' diff --git a/tests.py b/tests.py index 21cfe45..612d6b8 100644 --- a/tests.py +++ b/tests.py @@ -20,7 +20,8 @@ from numpy import * from pymclevel.infiniteworld import MCServerChunkGenerator log = logging.getLogger(__name__) -info = log.info +warn, error, info, debug = log.warn, log.error, log.info, log.debug + #logging.basicConfig(format=u'%(levelname)s:%(message)s') #logging.getLogger().level = logging.INFO