summaryrefslogtreecommitdiffstats
path: root/external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1
blob: 723a732a593ab4e7f9b08595b56e85ea52f68a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java
--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java	2021-03-12 10:15:06.215353433 +0000
+++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java	2021-03-12 10:26:44.036236575 +0000
@@ -37,8 +37,7 @@
 import org.pentaho.reporting.libraries.resourceloader.ResourceData;
 import org.pentaho.reporting.libraries.base.util.StringUtils;
 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 
 /**
  * Creation-Date: 21.07.2007, 20:14:05
@@ -47,7 +46,8 @@
  */
 public class AfmFontRegistry extends AbstractFontFileRegistry
 {
-  private static final Log logger = LogFactory.getLog(AfmFontRegistry.class);
+  private static final Logger logger = Logger.getLogger(AfmFontRegistry.class.getName());
+
   /**
    * The font path filter is used to collect font files and directories during
    * the font path registration.
@@ -133,7 +133,7 @@
         filePfb.isFile() == false ||
         filePfb.canRead() == false)
     {
-      logger.warn("Cannot embedd font: " + filePfb + " is missing for " + font);
+      logger.warning("Cannot embedd font: " + filePfb + " is missing for " + font);
       embedded = false;
     }
 
@@ -264,11 +264,11 @@
     catch (final ClassNotFoundException cnfe)
     {
       // ignore the exception.
-      logger.debug("Failed to restore the cache: Cache was created by a different version of LibFonts");
+      logger.config("Failed to restore the cache: Cache was created by a different version of LibFonts");
     }
     catch (Exception e)
     {
-      logger.debug("Failed to restore the cache:", e);
+      logger.config("Failed to restore the cache: " + e);
     }
   }
 
@@ -311,14 +311,14 @@
         catch (IOException e)
         {
           // ignore ..
-          logger.debug("Failed to store cached font data", e);
+          logger.config("Failed to store cached font data: " + e);
         }
       }
     }
     catch (IOException e)
     {
       // should not happen
-      logger.debug("Failed to store cached font data", e);
+      logger.config("Failed to store cached font data: " + e);
     }
   }
 }
diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java
--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java	2021-03-12 10:15:06.228353587 +0000
+++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java	2021-03-12 10:27:11.614524616 +0000
@@ -31,8 +31,7 @@
 import org.pentaho.reporting.libraries.resourceloader.factory.property.PropertiesResourceFactory;
 import org.pentaho.reporting.libraries.base.config.Configuration;
 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 
 /**
  * A global registry for all supported encodings. This offers the option to fall
@@ -42,7 +41,7 @@
  */
 public final class EncodingRegistry
 {
-  private static final Log logger = LogFactory.getLog(EncodingRegistry.class);
+  private static final Logger logger = Logger.getLogger(EncodingRegistry.class.getName());
 
   /**
    * Implementation doc: This class uses several sources to load the encodings.
@@ -266,7 +265,7 @@
       catch (Exception e)
       {
         // fall back ...
-        logger.warn("Failed to create external-encoding instance for key " + key, e);
+        logger.warning("Failed to create external-encoding instance for key " + key + " : " + e);
       }
     }
     if (isEncodingSupportedJVM(name))
diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java
--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java	2021-03-12 10:15:06.218353469 +0000
+++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java	2021-03-12 10:27:47.015894357 +0000
@@ -35,8 +35,7 @@
 import org.pentaho.reporting.libraries.fonts.encoding.External8BitEncodingData;
 import org.pentaho.reporting.libraries.base.config.DefaultConfiguration;
 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 
 /**
  * A simple sourcecode generator.
@@ -45,7 +44,7 @@
  */
 public class EncodingGenerator
 {
-  private static final Log logger = LogFactory.getLog(EncodingGenerator.class);
+  private static final Logger logger = Logger.getLogger(EncodingGenerator.class.getName());
 
   private File targetDirectory;
   private DefaultConfiguration propertySet;
@@ -200,7 +199,7 @@
       }
       catch(Exception e)
       {
-        logger.warn ("Failed to generate Encoding " + key, e);
+        logger.warning("Failed to generate Encoding " + key + " : " + e);
       }
     }
   }
@@ -269,7 +268,7 @@
       }
       catch(Exception e)
       {
-        logger.warn ("Failed to generate Encoding " + key, e);
+        logger.warning("Failed to generate Encoding " + key + " : " + e);
       }
     }
 
diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java
--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java	2021-03-12 10:15:06.217353457 +0000
+++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java	2021-03-12 10:28:33.904384084 +0000
@@ -37,8 +37,7 @@
 import org.pentaho.reporting.libraries.resourceloader.ResourceData;
 import org.pentaho.reporting.libraries.base.util.StringUtils;
 import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 
 /**
  * Creation-Date: 21.07.2007, 16:58:06
@@ -47,7 +46,7 @@
  */
 public class PfmFontRegistry extends AbstractFontFileRegistry
 {
-  private static final Log logger = LogFactory.getLog(PfmFontRegistry.class);
+  private static final Logger logger = Logger.getLogger(PfmFontRegistry.class.getName());
 
   /**
    * The font path filter is used to collect font files and directories during
@@ -146,7 +145,7 @@
         filePfb.isFile() == false ||
         filePfb.canRead() == false)
     {
-      logger.warn("Cannot embedd font: " + filePfb + " is missing for " + font);
+      logger.warning("Cannot embedd font: " + filePfb + " is missing for " + font);
       embedded = false;
     }
 
@@ -155,7 +154,7 @@
     {
       if (pfmFont.isItextCompatible() == false)
       {
-        logger.warn("Cannot embedd font: pfb-file for " + font + " is not valid (according to iText).");
+        logger.warning("Cannot embedd font: pfb-file for " + font + " is not valid (according to iText).");
       }
     }
     registerFont (pfmFont);
@@ -283,7 +282,7 @@
     }
     catch (Exception e)
     {
-      logger.debug("Failed to restore the cache:", e);
+      logger.config("Failed to restore the cache: " + e);
     }
   }
 
@@ -326,14 +325,14 @@
         catch (IOException e)
         {
           // ignore ..
-          logger.debug("Failed to store cached font data", e);
+          logger.config("Failed to store cached font data: " + e);
         }
       }
     }
     catch (IOException e)
     {
       // should not happen
-      logger.debug("Failed to store cached font data", e);
+      logger.config("Failed to store cached font data: " + e);
     }
   }
 }
diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java
--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java	2021-03-12 10:15:06.229353599 +0000
+++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java	2021-03-12 10:25:43.831607771 +0000
@@ -25,8 +25,7 @@
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 import org.pentaho.reporting.libraries.fonts.LibFontBoot;
 import org.pentaho.reporting.libraries.fonts.encoding.EncodingRegistry;
 import org.pentaho.reporting.libraries.base.util.StringUtils;
@@ -39,7 +38,7 @@
  */
 public abstract class AbstractFontFileRegistry implements FontRegistry
 {
-  private static final Log logger = LogFactory.getLog(AbstractFontFileRegistry.class);
+  private static final Logger logger = Logger.getLogger(AbstractFontFileRegistry.class.getName());
 
   private HashMap seenFiles;
 
@@ -74,7 +73,7 @@
       }
       catch (Exception e)
       {
-        logger.warn("Extra font path " + extraDir + " could not be fully registered.", e);
+        logger.warning("Extra font path " + extraDir + " could not be fully registered: " + e);
       }
     }
   }
@@ -98,13 +97,13 @@
     final String jrepath = safeSystemGetProperty("java.home", ".");
     final String fs = safeSystemGetProperty("file.separator", File.separator);
 
-    logger.debug("Running on operating system: " + osname);
-    logger.debug("Character encoding used as default: " + encoding);
+    logger.config("Running on operating system: " + osname);
+    logger.config("Character encoding used as default: " + encoding);
 
     if (safeSystemGetProperty("mrj.version", null) != null)
     {
       final String userhome = safeSystemGetProperty("user.home", ".");
-      logger.debug("Detected MacOS (Property 'mrj.version' is present.");
+      logger.config("Detected MacOS (Property 'mrj.version' is present.");
       registerFontPath(new File(userhome + "/Library/Fonts"), encoding);
       registerFontPath(new File("/Library/Fonts"), encoding);
       registerFontPath(new File("/Network/Library/Fonts"), encoding);
@@ -116,7 +115,7 @@
     }
     else
     {
-      logger.debug("Assuming unix like file structures");
+      logger.config("Assuming unix like file structures");
       // Assume X11 is installed in the default location.
       registerFontPath(new File("/usr/X11R6/lib/X11/fonts"), encoding);
       registerFontPath(new File("/usr/share/fonts"), encoding);
@@ -145,7 +144,7 @@
    */
   private void registerWindowsFontPath(final String encoding)
   {
-    logger.debug("Found 'Windows' in the OS name, assuming DOS/Win32 structures");
+    logger.config("Found 'Windows' in the OS name, assuming DOS/Win32 structures");
     // Assume windows
     // If you are not using windows, ignore this. This just checks if a windows system
     // directory exist and includes a font dir.
@@ -182,7 +181,7 @@
         }
       }
     }
-    logger.debug("Fonts located in \"" + fontPath + '\"');
+    logger.config("Fonts located in \"" + fontPath + '\"');
     if (fontPath != null)
     {
       final File file = new File(fontPath);
@@ -272,7 +271,7 @@
       }
       catch (Exception e)
       {
-        logger.warn("Font " + file + " is invalid. Message:" + e.getMessage(), e);
+        logger.warning("Font " + file + " is invalid. Message: " + e);
       }
     }
   }
diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java
--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java	2021-03-12 10:15:06.205353315 +0000
+++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java	2021-03-12 10:29:03.600694237 +0000
@@ -22,8 +22,7 @@
 import java.io.IOException;
 
 import org.pentaho.reporting.libraries.fonts.tools.ByteTable;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 
 /**
  * Creation-Date: 11.06.2006, 17:11:16
@@ -32,7 +31,7 @@
  */
 public final class GraphemeClassifier
 {
-  private static final Log logger = LogFactory.getLog(GraphemeClassifier.class);
+  private static final Logger logger = Logger.getLogger(GraphemeClassifier.class.getName());
 
   public static final int OTHER = 0;
 
@@ -70,7 +69,7 @@
       }
       catch(Exception e)
       {
-        logger.warn ("Unable to load the pre-generated classification data.", e);
+        logger.warning("Unable to load the pre-generated classification data: " + e);
       }
       finally
       {
diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java
--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java	2021-03-12 10:15:06.214353421 +0000
+++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java	2021-03-12 10:29:19.746862875 +0000
@@ -24,8 +24,7 @@
 import org.pentaho.reporting.libraries.fonts.ByteAccessUtilities;
 import org.pentaho.reporting.libraries.fonts.io.FileFontDataInputSource;
 import org.pentaho.reporting.libraries.fonts.io.FontDataInputSource;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 
 /**
  * Creation-Date: 06.11.2005, 18:27:21
@@ -34,7 +33,7 @@
  */
 public class TrueTypeFont
 {
-  private static final Log logger = LogFactory.getLog(TrueTypeFont.class);
+  private static final Logger logger = Logger.getLogger(TrueTypeFont.class.getName());
 
   private static class TrueTypeFontHeader
   {
@@ -327,7 +326,7 @@
               (FontHeaderTable) getTable(FontHeaderTable.TABLE_ID);
       if (header == null)
       {
-        logger.warn("The font '" + filename + "' does not have a 'head' table. The font file is not valid.");
+        logger.warning("The font '" + filename + "' does not have a 'head' table. The font file is not valid.");
         return null;
       }
       final byte[] buffer =
diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java
--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java	2021-03-12 10:15:06.213353409 +0000
+++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java	2021-03-12 10:29:38.442058137 +0000
@@ -21,8 +21,7 @@
 import java.io.IOException;
 import java.util.HashMap;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 import org.pentaho.reporting.libraries.fonts.io.FileFontDataInputSource;
 import org.pentaho.reporting.libraries.fonts.io.FontDataInputSource;
 import org.pentaho.reporting.libraries.fonts.registry.FontContext;
@@ -38,7 +37,7 @@
  */
 public class TrueTypeFontMetricsFactory implements FontMetricsFactory
 {
-  private static final Log logger = LogFactory.getLog(TrueTypeFontMetricsFactory.class);
+  private static final Logger logger = Logger.getLogger(TrueTypeFontMetricsFactory.class.getName());
   private HashMap fontRecords;
 
   public TrueTypeFontMetricsFactory()
@@ -77,7 +76,7 @@
     }
     catch (IOException e)
     {
-      logger.warn("Unable to read the font.", e);
+      logger.warning("Unable to read the font: " + e);
       // todo: We should throw a better exception instead, shouldnt we?
       throw new IllegalStateException();
     }
diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java
--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java	2021-03-12 10:15:06.214353421 +0000
+++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java	2021-03-12 10:31:15.504071887 +0000
@@ -28,8 +28,7 @@
 import java.io.Serializable;
 import java.util.HashMap;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
 import org.pentaho.reporting.libraries.fonts.FontException;
 import org.pentaho.reporting.libraries.fonts.LibFontBoot;
 import org.pentaho.reporting.libraries.fonts.cache.FontCache;
@@ -61,7 +60,7 @@
     return secondLevelCache;
   }
 
-  private static final Log logger = LogFactory.getLog(TrueTypeFontRegistry.class);
+  private static final Logger logger = Logger.getLogger(TrueTypeFontRegistry.class.getName());
 
   /**
    * The font path filter is used to collect font files and directories during the font path registration.
@@ -180,7 +179,7 @@
     }
     catch (Exception e)
     {
-      logger.info("Unable to register font file " + file, e);
+      logger.info("Unable to register font file " + file + " : " + e);
       // An error must not stop us on our holy mission to find and register
       // all fonts :)
       return false;
@@ -206,7 +205,7 @@
     }
     catch (FontException e)
     {
-      logger.info("The font '" + font.getFilename() + "' is invalid.", e);
+      logger.info("The font '" + font.getFilename() + "' is invalid: " + e);
       return;
     }
 
@@ -347,11 +346,11 @@
     catch (final ClassNotFoundException cnfe)
     {
       // ignore the exception.
-      logger.debug("Failed to restore the cache: Cache was created by a different version of LibFonts");
+      logger.config("Failed to restore the cache: Cache was created by a different version of LibFonts");
     }
     catch (Exception e)
     {
-      logger.debug("Non-Fatal: Failed to restore the cache. The cache will be rebuilt.", e);
+      logger.config("Non-Fatal: Failed to restore the cache. The cache will be rebuilt: " + e);
     }
   }
 
@@ -394,14 +393,14 @@
         catch (IOException e)
         {
           // ignore ..
-          logger.debug("Failed to store cached font data", e);
+          logger.config("Failed to store cached font data: " + e);
         }
       }
     }
     catch (IOException e)
     {
       // should not happen
-      logger.debug("Failed to store cached font data", e);
+      logger.config("Failed to store cached font data: " + e);
     }
   }
 }
--- a/source/org/pentaho/reporting/libraries/fonts/itext/BaseFontSupport.java
+++ b/source/org/pentaho/reporting/libraries/fonts/itext/BaseFontSupport.java
@@ -34,8 +34,8 @@
 import org.pentaho.reporting.libraries.fonts.merge.CompoundFontRecord;
 import org.pentaho.reporting.libraries.base.config.ExtendedConfiguration;
 import org.pentaho.reporting.libraries.base.util.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  * iText font support.
@@ -44,7 +44,7 @@
  */
 public class BaseFontSupport implements FontMapper
 {
-  private static final Log logger = LogFactory.getLog(BaseFontSupport.class);
+  private static final Logger logger = Logger.getLogger(BaseFontSupport.class.getName());
   /**
    * Storage for BaseFont objects created.
    */
@@ -235,7 +235,7 @@
             final FontSource source = (FontSource) registryFontRecord;
             if (source.isEmbeddable() == false)
             {
-              logger.warn("License of font forbids embedded usage for font: " + fontKey);
+              logger.warning("License of font forbids embedded usage for font: " + fontKey);
               // strict mode here?
               embeddedOverride = false;
             }
@@ -286,13 +286,13 @@
     }
     catch (Exception e)
     {
-      if (logger.isDebugEnabled())
+      if (logger.isLoggable(Level.CONFIG))
       {
-        logger.debug("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage(), e);
+        logger.config("BaseFont.createFont failed. Key = " + fontKey + ": " + e);
       }
-      else if (logger.isWarnEnabled())
+      else if (logger.isLoggable(Level.WARNING))
       {
-        logger.warn("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage());
+        logger.warning("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage());
       }
     }
     // fallback .. use BaseFont.HELVETICA as default
@@ -322,7 +322,7 @@
     }
     catch (Exception e)
     {
-      logger.warn("BaseFont.createFont for FALLBACK failed.", e);
+      logger.warning("BaseFont.createFont for FALLBACK failed: " + e);
       throw new BaseFontCreateException("Null font = " + fontKey);
     }
     throw new BaseFontCreateException("BaseFont creation failed, null font: " + fontKey);