/usr/share/doc/libcommons-logging-java/api/org/apache/commons/logging/LogFactory.html is in libcommons-logging-java-doc 1.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_60) on Mon Jul 14 21:22:04 UTC 2014 -->
<title>LogFactory (Logging Wrapper Library (Version 1.2))</title>
<meta name="date" content="2014-07-14">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="LogFactory (Logging Wrapper Library (Version 1.2))";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/commons/logging/LogSource.html" title="class in org.apache.commons.logging"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/logging/LogFactory.html" target="_top">Frames</a></li>
<li><a href="LogFactory.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.logging</div>
<h2 title="Class LogFactory" class="title">Class LogFactory</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.commons.logging.LogFactory</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../org/apache/commons/logging/impl/LogFactoryImpl.html" title="class in org.apache.commons.logging.impl">LogFactoryImpl</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="strong">LogFactory</span>
extends java.lang.Object</pre>
<div class="block">Factory for creating <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging"><code>Log</code></a> instances, with discovery and
configuration features similar to that employed by standard Java APIs
such as JAXP.
<p>
<strong>IMPLEMENTATION NOTE</strong> - This implementation is heavily
based on the SAXParserFactory and DocumentBuilderFactory implementations
(corresponding to the JAXP pluggability APIs) found in Apache Xerces.</div>
<dl><dt><span class="strong">Version:</span></dt>
<dd>$Id: LogFactory.java 1606041 2014-06-27 11:56:59Z tn $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#diagnosticPrefix">diagnosticPrefix</a></strong></code>
<div class="block">A string that gets prefixed to every message output by the
logDiagnostic method, so that users can clearly see which
LogFactory class is generating the output.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#DIAGNOSTICS_DEST_PROPERTY">DIAGNOSTICS_DEST_PROPERTY</a></strong></code>
<div class="block">The name (<code>org.apache.commons.logging.diagnostics.dest</code>)
of the property used to enable internal commons-logging
diagnostic output, in order to get information on what logging
implementations are being discovered, what classloaders they
are loaded through, etc.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.io.PrintStream</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#diagnosticsStream">diagnosticsStream</a></strong></code>
<div class="block">When null (the usual case), no diagnostic output will be
generated by LogFactory or LogFactoryImpl.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static java.util.Hashtable</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#factories">factories</a></strong></code>
<div class="block">The previously constructed <code>LogFactory</code> instances, keyed by
the <code>ClassLoader</code> with which it was created.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#FACTORY_DEFAULT">FACTORY_DEFAULT</a></strong></code>
<div class="block">The fully qualified class name of the fallback <code>LogFactory</code>
implementation class to use, if no other can be found.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#FACTORY_PROPERTIES">FACTORY_PROPERTIES</a></strong></code>
<div class="block">The name (<code>commons-logging.properties</code>) of the properties file to search for.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#FACTORY_PROPERTY">FACTORY_PROPERTY</a></strong></code>
<div class="block">The name (<code>org.apache.commons.logging.LogFactory</code>) of the property
used to identify the LogFactory implementation
class name.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#HASHTABLE_IMPLEMENTATION_PROPERTY">HASHTABLE_IMPLEMENTATION_PROPERTY</a></strong></code>
<div class="block">Setting this system property
(<code>org.apache.commons.logging.LogFactory.HashtableImpl</code>)
value allows the <code>Hashtable</code> used to store
classloaders to be substituted by an alternative implementation.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#nullClassLoaderFactory">nullClassLoaderFactory</a></strong></code>
<div class="block"><strong>Deprecated.</strong>
<div class="block"><i>since 1.1.2</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#PRIORITY_KEY">PRIORITY_KEY</a></strong></code>
<div class="block">The name (<code>priority</code>) of the key in the config file used to
specify the priority of that particular config file.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#SERVICE_ID">SERVICE_ID</a></strong></code>
<div class="block">JDK1.3+ <a href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider">
'Service Provider' specification</a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#TCCL_KEY">TCCL_KEY</a></strong></code>
<div class="block">The name (<code>use_tccl</code>) of the key in the config file used
to specify whether logging classes should be loaded via the thread
context class loader (TCCL), or not.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#thisClassLoader">thisClassLoader</a></strong></code>
<div class="block">A reference to the classloader that loaded this class.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#WEAK_HASHTABLE_CLASSNAME">WEAK_HASHTABLE_CLASSNAME</a></strong></code>
<div class="block">Name used to load the weak hashtable implementation by names.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#LogFactory()">LogFactory</a></strong>()</code>
<div class="block">Protected constructor that is not available for public use.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#cacheFactory(java.lang.ClassLoader,%20org.apache.commons.logging.LogFactory)">cacheFactory</a></strong>(java.lang.ClassLoader classLoader,
<a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a> factory)</code>
<div class="block">Remember this factory, so later calls to LogFactory.getCachedFactory
can return the previously created object (together with all its
cached Log objects).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#createFactory(java.lang.String,%20java.lang.ClassLoader)">createFactory</a></strong>(java.lang.String factoryClass,
java.lang.ClassLoader classLoader)</code>
<div class="block">Implements the operations described in the javadoc for newFactory.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.util.Hashtable</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#createFactoryStore()">createFactoryStore</a></strong>()</code>
<div class="block">Create the hashtable which will be used to store a map of
(context-classloader -> logfactory-object).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#directGetContextClassLoader()">directGetContextClassLoader</a></strong>()</code>
<div class="block">Return the thread context class loader if available; otherwise return null.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>abstract java.lang.Object</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getAttribute(java.lang.String)">getAttribute</a></strong>(java.lang.String name)</code>
<div class="block">Return the configuration attribute with the specified name (if any),
or <code>null</code> if there is no such attribute.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>abstract java.lang.String[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getAttributeNames()">getAttributeNames</a></strong>()</code>
<div class="block">Return an array containing the names of all currently defined
configuration attributes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getCachedFactory(java.lang.ClassLoader)">getCachedFactory</a></strong>(java.lang.ClassLoader contextClassLoader)</code>
<div class="block">Check cached factories (keyed by contextClassLoader)</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getClassLoader(java.lang.Class)">getClassLoader</a></strong>(java.lang.Class clazz)</code>
<div class="block">Safely get access to the classloader for the specified class.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.util.Properties</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getConfigurationFile(java.lang.ClassLoader,%20java.lang.String)">getConfigurationFile</a></strong>(java.lang.ClassLoader classLoader,
java.lang.String fileName)</code>
<div class="block">Locate a user-provided configuration file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getContextClassLoader()">getContextClassLoader</a></strong>()</code>
<div class="block">Returns the current context classloader.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.lang.ClassLoader</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getContextClassLoaderInternal()">getContextClassLoaderInternal</a></strong>()</code>
<div class="block">Calls LogFactory.directGetContextClassLoader under the control of an
AccessController class.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getFactory()">getFactory</a></strong>()</code>
<div class="block">Construct (if necessary) and return a <code>LogFactory</code>
instance, using the following ordered lookup procedure to determine
the name of the implementation class to be loaded.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>abstract <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging">Log</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getInstance(java.lang.Class)">getInstance</a></strong>(java.lang.Class clazz)</code>
<div class="block">Convenience method to derive a name from the specified class and
call <code>getInstance(String)</code> with it.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>abstract <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging">Log</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getInstance(java.lang.String)">getInstance</a></strong>(java.lang.String name)</code>
<div class="block">Construct (if necessary) and return a <code>Log</code> instance,
using the factory's current set of configuration attributes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging">Log</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getLog(java.lang.Class)">getLog</a></strong>(java.lang.Class clazz)</code>
<div class="block">Convenience method to return a named logger, without the application
having to care about factories.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging">Log</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getLog(java.lang.String)">getLog</a></strong>(java.lang.String name)</code>
<div class="block">Convenience method to return a named logger, without the application
having to care about factories.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.util.Properties</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getProperties(java.net.URL)">getProperties</a></strong>(java.net.URL url)</code>
<div class="block">Given a URL that refers to a .properties file, load that file.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.io.InputStream</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getResourceAsStream(java.lang.ClassLoader,%20java.lang.String)">getResourceAsStream</a></strong>(java.lang.ClassLoader loader,
java.lang.String name)</code>
<div class="block">Applets may run in an environment where accessing resources of a loader is
a secure operation, but where the commons-logging library has explicitly
been granted permission for that operation.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.util.Enumeration</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getResources(java.lang.ClassLoader,%20java.lang.String)">getResources</a></strong>(java.lang.ClassLoader loader,
java.lang.String name)</code>
<div class="block">Given a filename, return an enumeration of URLs pointing to
all the occurrences of that filename in the classpath.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#getSystemProperty(java.lang.String,%20java.lang.String)">getSystemProperty</a></strong>(java.lang.String key,
java.lang.String def)</code>
<div class="block">Read the specified system property, using an AccessController so that
the property can be read if JCL has been granted the appropriate
security rights even if the calling code has not.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#handleThrowable(java.lang.Throwable)">handleThrowable</a></strong>(java.lang.Throwable t)</code>
<div class="block">Checks whether the supplied Throwable is one that needs to be
re-thrown and ignores all others.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#implementsLogFactory(java.lang.Class)">implementsLogFactory</a></strong>(java.lang.Class logFactoryClass)</code>
<div class="block">Determines whether the given class actually implements <code>LogFactory</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.io.PrintStream</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#initDiagnostics()">initDiagnostics</a></strong>()</code>
<div class="block">Determines whether the user wants internal diagnostic output.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#isDiagnosticsEnabled()">isDiagnosticsEnabled</a></strong>()</code>
<div class="block">Indicates true if the user has enabled internal logging.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#logClassLoaderEnvironment(java.lang.Class)">logClassLoaderEnvironment</a></strong>(java.lang.Class clazz)</code>
<div class="block">Generate useful diagnostics regarding the classloader tree for
the specified class.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>private static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#logDiagnostic(java.lang.String)">logDiagnostic</a></strong>(java.lang.String msg)</code>
<div class="block">Write the specified message to the internal logging destination.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#logHierarchy(java.lang.String,%20java.lang.ClassLoader)">logHierarchy</a></strong>(java.lang.String prefix,
java.lang.ClassLoader classLoader)</code>
<div class="block">Logs diagnostic messages about the given classloader
and it's hierarchy.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#logRawDiagnostic(java.lang.String)">logRawDiagnostic</a></strong>(java.lang.String msg)</code>
<div class="block">Write the specified message to the internal logging destination.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#newFactory(java.lang.String,%20java.lang.ClassLoader)">newFactory</a></strong>(java.lang.String factoryClass,
java.lang.ClassLoader classLoader)</code>
<div class="block">Method provided for backwards compatibility; see newFactory version that
takes 3 parameters.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#newFactory(java.lang.String,%20java.lang.ClassLoader,%20java.lang.ClassLoader)">newFactory</a></strong>(java.lang.String factoryClass,
java.lang.ClassLoader classLoader,
java.lang.ClassLoader contextClassLoader)</code>
<div class="block">Return a new instance of the specified <code>LogFactory</code>
implementation class, loaded by the specified class loader.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#objectId(java.lang.Object)">objectId</a></strong>(java.lang.Object o)</code>
<div class="block">Returns a string that uniquely identifies the specified object, including
its class.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#release()">release</a></strong>()</code>
<div class="block">Release any internal references to previously created <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging"><code>Log</code></a>
instances returned by this factory.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#release(java.lang.ClassLoader)">release</a></strong>(java.lang.ClassLoader classLoader)</code>
<div class="block">Release any internal references to previously created <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging"><code>LogFactory</code></a>
instances that have been associated with the specified class loader
(if any), after calling the instance method <code>release()</code> on
each of them.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#releaseAll()">releaseAll</a></strong>()</code>
<div class="block">Release any internal references to previously created <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging"><code>LogFactory</code></a>
instances, after calling the instance method <code>release()</code> on
each of them.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#removeAttribute(java.lang.String)">removeAttribute</a></strong>(java.lang.String name)</code>
<div class="block">Remove any configuration attribute associated with the specified name.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#setAttribute(java.lang.String,%20java.lang.Object)">setAttribute</a></strong>(java.lang.String name,
java.lang.Object value)</code>
<div class="block">Set the configuration attribute with the specified name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>private static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/logging/LogFactory.html#trim(java.lang.String)">trim</a></strong>(java.lang.String src)</code>
<div class="block">Utility method to safely trim a string.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="PRIORITY_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PRIORITY_KEY</h4>
<pre>public static final java.lang.String PRIORITY_KEY</pre>
<div class="block">The name (<code>priority</code>) of the key in the config file used to
specify the priority of that particular config file. The associated value
is a floating-point number; higher values take priority over lower values.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.logging.LogFactory.PRIORITY_KEY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="TCCL_KEY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TCCL_KEY</h4>
<pre>public static final java.lang.String TCCL_KEY</pre>
<div class="block">The name (<code>use_tccl</code>) of the key in the config file used
to specify whether logging classes should be loaded via the thread
context class loader (TCCL), or not. By default, the TCCL is used.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.logging.LogFactory.TCCL_KEY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="FACTORY_PROPERTY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FACTORY_PROPERTY</h4>
<pre>public static final java.lang.String FACTORY_PROPERTY</pre>
<div class="block">The name (<code>org.apache.commons.logging.LogFactory</code>) of the property
used to identify the LogFactory implementation
class name. This can be used as a system property, or as an entry in a
configuration properties file.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.logging.LogFactory.FACTORY_PROPERTY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="FACTORY_DEFAULT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FACTORY_DEFAULT</h4>
<pre>public static final java.lang.String FACTORY_DEFAULT</pre>
<div class="block">The fully qualified class name of the fallback <code>LogFactory</code>
implementation class to use, if no other can be found.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.logging.LogFactory.FACTORY_DEFAULT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="FACTORY_PROPERTIES">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FACTORY_PROPERTIES</h4>
<pre>public static final java.lang.String FACTORY_PROPERTIES</pre>
<div class="block">The name (<code>commons-logging.properties</code>) of the properties file to search for.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.logging.LogFactory.FACTORY_PROPERTIES">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="SERVICE_ID">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SERVICE_ID</h4>
<pre>protected static final java.lang.String SERVICE_ID</pre>
<div class="block">JDK1.3+ <a href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider">
'Service Provider' specification</a>.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.logging.LogFactory.SERVICE_ID">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DIAGNOSTICS_DEST_PROPERTY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DIAGNOSTICS_DEST_PROPERTY</h4>
<pre>public static final java.lang.String DIAGNOSTICS_DEST_PROPERTY</pre>
<div class="block">The name (<code>org.apache.commons.logging.diagnostics.dest</code>)
of the property used to enable internal commons-logging
diagnostic output, in order to get information on what logging
implementations are being discovered, what classloaders they
are loaded through, etc.
<p>
If a system property of this name is set then the value is
assumed to be the name of a file. The special strings
STDOUT or STDERR (case-sensitive) indicate output to
System.out and System.err respectively.
<p>
Diagnostic logging should be used only to debug problematic
configurations and should not be set in normal production use.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.logging.LogFactory.DIAGNOSTICS_DEST_PROPERTY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="diagnosticsStream">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>diagnosticsStream</h4>
<pre>private static java.io.PrintStream diagnosticsStream</pre>
<div class="block">When null (the usual case), no diagnostic output will be
generated by LogFactory or LogFactoryImpl. When non-null,
interesting events will be written to the specified object.</div>
</li>
</ul>
<a name="diagnosticPrefix">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>diagnosticPrefix</h4>
<pre>private static final java.lang.String diagnosticPrefix</pre>
<div class="block">A string that gets prefixed to every message output by the
logDiagnostic method, so that users can clearly see which
LogFactory class is generating the output.</div>
</li>
</ul>
<a name="HASHTABLE_IMPLEMENTATION_PROPERTY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HASHTABLE_IMPLEMENTATION_PROPERTY</h4>
<pre>public static final java.lang.String HASHTABLE_IMPLEMENTATION_PROPERTY</pre>
<div class="block">Setting this system property
(<code>org.apache.commons.logging.LogFactory.HashtableImpl</code>)
value allows the <code>Hashtable</code> used to store
classloaders to be substituted by an alternative implementation.
<p>
<strong>Note:</strong> <code>LogFactory</code> will print:
<pre>
[ERROR] LogFactory: Load of custom hashtable failed
</pre>
to system error and then continue using a standard Hashtable.
<p>
<strong>Usage:</strong> Set this property when Java is invoked
and <code>LogFactory</code> will attempt to load a new instance
of the given implementation class.
For example, running the following ant scriplet:
<pre>
<java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
...
<sysproperty
key="org.apache.commons.logging.LogFactory.HashtableImpl"
value="org.apache.commons.logging.AltHashtable"/>
</java>
</pre>
will mean that <code>LogFactory</code> will load an instance of
<code>org.apache.commons.logging.AltHashtable</code>.
<p>
A typical use case is to allow a custom
Hashtable implementation using weak references to be substituted.
This will allow classloaders to be garbage collected without
the need to release them (on 1.3+ JVMs only, of course ;).</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.logging.LogFactory.HASHTABLE_IMPLEMENTATION_PROPERTY">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="WEAK_HASHTABLE_CLASSNAME">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>WEAK_HASHTABLE_CLASSNAME</h4>
<pre>private static final java.lang.String WEAK_HASHTABLE_CLASSNAME</pre>
<div class="block">Name used to load the weak hashtable implementation by names.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.commons.logging.LogFactory.WEAK_HASHTABLE_CLASSNAME">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="thisClassLoader">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>thisClassLoader</h4>
<pre>private static final java.lang.ClassLoader thisClassLoader</pre>
<div class="block">A reference to the classloader that loaded this class. This is the
same as LogFactory.class.getClassLoader(). However computing this
value isn't quite as simple as that, as we potentially need to use
AccessControllers etc. It's more efficient to compute it once and
cache it here.</div>
</li>
</ul>
<a name="factories">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>factories</h4>
<pre>protected static java.util.Hashtable factories</pre>
<div class="block">The previously constructed <code>LogFactory</code> instances, keyed by
the <code>ClassLoader</code> with which it was created.</div>
</li>
</ul>
<a name="nullClassLoaderFactory">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>nullClassLoaderFactory</h4>
<pre>protected static volatile <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a> nullClassLoaderFactory</pre>
<div class="block"><span class="strong">Deprecated.</span> <i>since 1.1.2</i></div>
<div class="block">Previously constructed <code>LogFactory</code> instance as in the
<code>factories</code> map, but for the case where
<code>getClassLoader</code> returns <code>null</code>.
This can happen when:
<ul>
<li>using JDK1.1 and the calling code is loaded via the system
classloader (very common)</li>
<li>using JDK1.2+ and the calling code is loaded via the boot
classloader (only likely for embedded systems work).</li>
</ul>
Note that <code>factories</code> is a <i>Hashtable</i> (not a HashMap),
and hashtables don't allow null as a key.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="LogFactory()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>LogFactory</h4>
<pre>protected LogFactory()</pre>
<div class="block">Protected constructor that is not available for public use.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getAttribute(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAttribute</h4>
<pre>public abstract java.lang.Object getAttribute(java.lang.String name)</pre>
<div class="block">Return the configuration attribute with the specified name (if any),
or <code>null</code> if there is no such attribute.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - Name of the attribute to return</dd></dl>
</li>
</ul>
<a name="getAttributeNames()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAttributeNames</h4>
<pre>public abstract java.lang.String[] getAttributeNames()</pre>
<div class="block">Return an array containing the names of all currently defined
configuration attributes. If there are no such attributes, a zero
length array is returned.</div>
</li>
</ul>
<a name="getInstance(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstance</h4>
<pre>public abstract <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging">Log</a> getInstance(java.lang.Class clazz)
throws <a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></pre>
<div class="block">Convenience method to derive a name from the specified class and
call <code>getInstance(String)</code> with it.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>clazz</code> - Class for which a suitable Log name will be derived</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></code> - if a suitable <code>Log</code>
instance cannot be returned</dd></dl>
</li>
</ul>
<a name="getInstance(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstance</h4>
<pre>public abstract <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging">Log</a> getInstance(java.lang.String name)
throws <a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></pre>
<div class="block">Construct (if necessary) and return a <code>Log</code> instance,
using the factory's current set of configuration attributes.
<p>
<strong>NOTE</strong> - Depending upon the implementation of
the <code>LogFactory</code> you are using, the <code>Log</code>
instance you are returned may or may not be local to the current
application, and may or may not be returned again on a subsequent
call with the same name argument.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - Logical name of the <code>Log</code> instance to be
returned (the meaning of this name is only known to the underlying
logging implementation that is being wrapped)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></code> - if a suitable <code>Log</code>
instance cannot be returned</dd></dl>
</li>
</ul>
<a name="release()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre>public abstract void release()</pre>
<div class="block">Release any internal references to previously created <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging"><code>Log</code></a>
instances returned by this factory. This is useful in environments
like servlet containers, which implement application reloading by
throwing away a ClassLoader. Dangling references to objects in that
class loader would prevent garbage collection.</div>
</li>
</ul>
<a name="removeAttribute(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeAttribute</h4>
<pre>public abstract void removeAttribute(java.lang.String name)</pre>
<div class="block">Remove any configuration attribute associated with the specified name.
If there is no such attribute, no action is taken.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - Name of the attribute to remove</dd></dl>
</li>
</ul>
<a name="setAttribute(java.lang.String, java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAttribute</h4>
<pre>public abstract void setAttribute(java.lang.String name,
java.lang.Object value)</pre>
<div class="block">Set the configuration attribute with the specified name. Calling
this with a <code>null</code> value is equivalent to calling
<code>removeAttribute(name)</code>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - Name of the attribute to set</dd><dd><code>value</code> - Value of the attribute to set, or <code>null</code>
to remove any setting for this attribute</dd></dl>
</li>
</ul>
<a name="createFactoryStore()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createFactoryStore</h4>
<pre>private static final java.util.Hashtable createFactoryStore()</pre>
<div class="block">Create the hashtable which will be used to store a map of
(context-classloader -> logfactory-object). Version 1.2+ of Java
supports "weak references", allowing a custom Hashtable class
to be used which uses only weak references to its keys. Using weak
references can fix memory leaks on webapp unload in some cases (though
not all). Version 1.1 of Java does not support weak references, so we
must dynamically determine which we are using. And just for fun, this
code also supports the ability for a system property to specify an
arbitrary Hashtable implementation name.
<p>
Note that the correct way to ensure no memory leaks occur is to ensure
that LogFactory.release(contextClassLoader) is called whenever a
webapp is undeployed.</div>
</li>
</ul>
<a name="trim(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>trim</h4>
<pre>private static java.lang.String trim(java.lang.String src)</pre>
<div class="block">Utility method to safely trim a string.</div>
</li>
</ul>
<a name="handleThrowable(java.lang.Throwable)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleThrowable</h4>
<pre>protected static void handleThrowable(java.lang.Throwable t)</pre>
<div class="block">Checks whether the supplied Throwable is one that needs to be
re-thrown and ignores all others.
The following errors are re-thrown:
<ul>
<li>ThreadDeath</li>
<li>VirtualMachineError</li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>t</code> - the Throwable to check</dd></dl>
</li>
</ul>
<a name="getFactory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFactory</h4>
<pre>public static <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a> getFactory()
throws <a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></pre>
<div class="block">Construct (if necessary) and return a <code>LogFactory</code>
instance, using the following ordered lookup procedure to determine
the name of the implementation class to be loaded.
<p>
<ul>
<li>The <code>org.apache.commons.logging.LogFactory</code> system
property.</li>
<li>The JDK 1.3 Service Discovery mechanism</li>
<li>Use the properties file <code>commons-logging.properties</code>
file, if found in the class path of this class. The configuration
file is in standard <code>java.util.Properties</code> format and
contains the fully qualified name of the implementation class
with the key being the system property defined above.</li>
<li>Fall back to a default implementation class
(<code>org.apache.commons.logging.impl.LogFactoryImpl</code>).</li>
</ul>
<p>
<em>NOTE</em> - If the properties file method of identifying the
<code>LogFactory</code> implementation class is utilized, all of the
properties defined in this file will be set as configuration attributes
on the corresponding <code>LogFactory</code> instance.
<p>
<em>NOTE</em> - In a multi-threaded environment it is possible
that two different instances will be returned for the same
classloader environment.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></code> - if the implementation class is not
available or cannot be instantiated.</dd></dl>
</li>
</ul>
<a name="getLog(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLog</h4>
<pre>public static <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging">Log</a> getLog(java.lang.Class clazz)
throws <a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></pre>
<div class="block">Convenience method to return a named logger, without the application
having to care about factories.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>clazz</code> - Class from which a log name will be derived</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></code> - if a suitable <code>Log</code>
instance cannot be returned</dd></dl>
</li>
</ul>
<a name="getLog(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLog</h4>
<pre>public static <a href="../../../../org/apache/commons/logging/Log.html" title="interface in org.apache.commons.logging">Log</a> getLog(java.lang.String name)
throws <a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></pre>
<div class="block">Convenience method to return a named logger, without the application
having to care about factories.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - Logical name of the <code>Log</code> instance to be
returned (the meaning of this name is only known to the underlying
logging implementation that is being wrapped)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></code> - if a suitable <code>Log</code>
instance cannot be returned</dd></dl>
</li>
</ul>
<a name="release(java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>release</h4>
<pre>public static void release(java.lang.ClassLoader classLoader)</pre>
<div class="block">Release any internal references to previously created <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging"><code>LogFactory</code></a>
instances that have been associated with the specified class loader
(if any), after calling the instance method <code>release()</code> on
each of them.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>classLoader</code> - ClassLoader for which to release the LogFactory</dd></dl>
</li>
</ul>
<a name="releaseAll()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>releaseAll</h4>
<pre>public static void releaseAll()</pre>
<div class="block">Release any internal references to previously created <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging"><code>LogFactory</code></a>
instances, after calling the instance method <code>release()</code> on
each of them. This is useful in environments like servlet containers,
which implement application reloading by throwing away a ClassLoader.
Dangling references to objects in that class loader would prevent
garbage collection.</div>
</li>
</ul>
<a name="getClassLoader(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getClassLoader</h4>
<pre>protected static java.lang.ClassLoader getClassLoader(java.lang.Class clazz)</pre>
<div class="block">Safely get access to the classloader for the specified class.
<p>
Theoretically, calling getClassLoader can throw a security exception,
and so should be done under an AccessController in order to provide
maximum flexibility. However in practice people don't appear to use
security policies that forbid getClassLoader calls. So for the moment
all code is written to call this method rather than Class.getClassLoader,
so that we could put AccessController stuff in this method without any
disruption later if we need to.
<p>
Even when using an AccessController, however, this method can still
throw SecurityException. Commons-logging basically relies on the
ability to access classloaders, ie a policy that forbids all
classloader access will also prevent commons-logging from working:
currently this method will throw an exception preventing the entire app
from starting up. Maybe it would be good to detect this situation and
just disable all commons-logging? Not high priority though - as stated
above, security policies that prevent classloader access aren't common.
<p>
Note that returning an object fetched via an AccessController would
technically be a security flaw anyway; untrusted code that has access
to a trusted JCL library could use it to fetch the classloader for
a class even when forbidden to do so directly.</div>
<dl><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="getContextClassLoader()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContextClassLoader</h4>
<pre>protected static java.lang.ClassLoader getContextClassLoader()
throws <a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></pre>
<div class="block">Returns the current context classloader.
<p>
In versions prior to 1.1, this method did not use an AccessController.
In version 1.1, an AccessController wrapper was incorrectly added to
this method, causing a minor security flaw.
<p>
In version 1.1.1 this change was reverted; this method no longer uses
an AccessController. User code wishing to obtain the context classloader
must invoke this method via AccessController.doPrivileged if it needs
support for that.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the context classloader associated with the current thread,
or null if security doesn't allow it.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></code> - if there was some weird error while
attempting to get the context classloader.</dd></dl>
</li>
</ul>
<a name="getContextClassLoaderInternal()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getContextClassLoaderInternal</h4>
<pre>private static java.lang.ClassLoader getContextClassLoaderInternal()
throws <a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></pre>
<div class="block">Calls LogFactory.directGetContextClassLoader under the control of an
AccessController class. This means that java code running under a
security manager that forbids access to ClassLoaders will still work
if this class is given appropriate privileges, even when the caller
doesn't have such privileges. Without using an AccessController, the
the entire call stack must have the privilege before the call is
allowed.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the context classloader associated with the current thread,
or null if security doesn't allow it.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></code> - if there was some weird error while
attempting to get the context classloader.</dd></dl>
</li>
</ul>
<a name="directGetContextClassLoader()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>directGetContextClassLoader</h4>
<pre>protected static java.lang.ClassLoader directGetContextClassLoader()
throws <a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></pre>
<div class="block">Return the thread context class loader if available; otherwise return null.
<p>
Most/all code should call getContextClassLoaderInternal rather than
calling this method directly.
<p>
The thread context class loader is available for JDK 1.2
or later, if certain security conditions are met.
<p>
Note that no internal logging is done within this method because
this method is called every time LogFactory.getLogger() is called,
and we don't want too much output generated here.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the thread's context classloader or <code>null</code> if the java security
policy forbids access to the context classloader from one of the classes
in the current call stack.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></code> - if a suitable class loader
cannot be identified.</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="getCachedFactory(java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCachedFactory</h4>
<pre>private static <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a> getCachedFactory(java.lang.ClassLoader contextClassLoader)</pre>
<div class="block">Check cached factories (keyed by contextClassLoader)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>contextClassLoader</code> - is the context classloader associated
with the current thread. This allows separate LogFactory objects
per component within a container, provided each component has
a distinct context classloader set. This parameter may be null
in JDK1.1, and in embedded systems where jcl-using code is
placed in the bootclasspath.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the factory associated with the specified classloader if
one has previously been created, or null if this is the first time
we have seen this particular classloader.</dd></dl>
</li>
</ul>
<a name="cacheFactory(java.lang.ClassLoader, org.apache.commons.logging.LogFactory)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cacheFactory</h4>
<pre>private static void cacheFactory(java.lang.ClassLoader classLoader,
<a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a> factory)</pre>
<div class="block">Remember this factory, so later calls to LogFactory.getCachedFactory
can return the previously created object (together with all its
cached Log objects).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>classLoader</code> - should be the current context classloader. Note that
this can be null under some circumstances; this is ok.</dd><dd><code>factory</code> - should be the factory to cache. This should never be null.</dd></dl>
</li>
</ul>
<a name="newFactory(java.lang.String, java.lang.ClassLoader, java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newFactory</h4>
<pre>protected static <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a> newFactory(java.lang.String factoryClass,
java.lang.ClassLoader classLoader,
java.lang.ClassLoader contextClassLoader)
throws <a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></pre>
<div class="block">Return a new instance of the specified <code>LogFactory</code>
implementation class, loaded by the specified class loader.
If that fails, try the class loader used to load this
(abstract) LogFactory.
<h2>ClassLoader conflicts</h2>
<p>
Note that there can be problems if the specified ClassLoader is not the
same as the classloader that loaded this class, ie when loading a
concrete LogFactory subclass via a context classloader.
<p>
The problem is the same one that can occur when loading a concrete Log
subclass via a context classloader.
<p>
The problem occurs when code running in the context classloader calls
class X which was loaded via a parent classloader, and class X then calls
LogFactory.getFactory (either directly or via LogFactory.getLog). Because
class X was loaded via the parent, it binds to LogFactory loaded via
the parent. When the code in this method finds some LogFactoryYYYY
class in the child (context) classloader, and there also happens to be a
LogFactory class defined in the child classloader, then LogFactoryYYYY
will be bound to LogFactory@childloader. It cannot be cast to
LogFactory@parentloader, ie this method cannot return the object as
the desired type. Note that it doesn't matter if the LogFactory class
in the child classloader is identical to the LogFactory class in the
parent classloader, they are not compatible.
<p>
The solution taken here is to simply print out an error message when
this occurs then throw an exception. The deployer of the application
must ensure they remove all occurrences of the LogFactory class from
the child classloader in order to resolve the issue. Note that they
do not have to move the custom LogFactory subclass; that is ok as
long as the only LogFactory class it can find to bind to is in the
parent classloader.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>factoryClass</code> - Fully qualified name of the <code>LogFactory</code>
implementation class</dd><dd><code>classLoader</code> - ClassLoader from which to load this class</dd><dd><code>contextClassLoader</code> - is the context that this new factory will
manage logging for.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging">LogConfigurationException</a></code> - if a suitable instance
cannot be created</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="newFactory(java.lang.String, java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newFactory</h4>
<pre>protected static <a href="../../../../org/apache/commons/logging/LogFactory.html" title="class in org.apache.commons.logging">LogFactory</a> newFactory(java.lang.String factoryClass,
java.lang.ClassLoader classLoader)</pre>
<div class="block">Method provided for backwards compatibility; see newFactory version that
takes 3 parameters.
<p>
This method would only ever be called in some rather odd situation.
Note that this method is static, so overriding in a subclass doesn't
have any effect unless this method is called from a method in that
subclass. However this method only makes sense to use from the
getFactory method, and as that is almost always invoked via
LogFactory.getFactory, any custom definition in a subclass would be
pointless. Only a class with a custom getFactory method, then invoked
directly via CustomFactoryImpl.getFactory or similar would ever call
this. Anyway, it's here just in case, though the "managed class loader"
value output to the diagnostics will not report the correct value.</div>
</li>
</ul>
<a name="createFactory(java.lang.String, java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createFactory</h4>
<pre>protected static java.lang.Object createFactory(java.lang.String factoryClass,
java.lang.ClassLoader classLoader)</pre>
<div class="block">Implements the operations described in the javadoc for newFactory.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>factoryClass</code> - </dd><dd><code>classLoader</code> - used to load the specified factory class. This is
expected to be either the TCCL or the classloader which loaded this
class. Note that the classloader which loaded this class might be
"null" (ie the bootloader) for embedded systems.</dd>
<dt><span class="strong">Returns:</span></dt><dd>either a LogFactory object or a LogConfigurationException object.</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="implementsLogFactory(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>implementsLogFactory</h4>
<pre>private static boolean implementsLogFactory(java.lang.Class logFactoryClass)</pre>
<div class="block">Determines whether the given class actually implements <code>LogFactory</code>.
Diagnostic information is also logged.
<p>
<strong>Usage:</strong> to diagnose whether a classloader conflict is the cause
of incompatibility. The test used is whether the class is assignable from
the <code>LogFactory</code> class loaded by the class's classloader.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>logFactoryClass</code> - <code>Class</code> which may implement <code>LogFactory</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the <code>logFactoryClass</code> does extend
<code>LogFactory</code> when that class is loaded via the same
classloader that loaded the <code>logFactoryClass</code>.</dd></dl>
</li>
</ul>
<a name="getResourceAsStream(java.lang.ClassLoader, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResourceAsStream</h4>
<pre>private static java.io.InputStream getResourceAsStream(java.lang.ClassLoader loader,
java.lang.String name)</pre>
<div class="block">Applets may run in an environment where accessing resources of a loader is
a secure operation, but where the commons-logging library has explicitly
been granted permission for that operation. In this case, we need to
run the operation using an AccessController.</div>
</li>
</ul>
<a name="getResources(java.lang.ClassLoader, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResources</h4>
<pre>private static java.util.Enumeration getResources(java.lang.ClassLoader loader,
java.lang.String name)</pre>
<div class="block">Given a filename, return an enumeration of URLs pointing to
all the occurrences of that filename in the classpath.
<p>
This is just like ClassLoader.getResources except that the
operation is done under an AccessController so that this method will
succeed when this jarfile is privileged but the caller is not.
This method must therefore remain private to avoid security issues.
<p>
If no instances are found, an Enumeration is returned whose
hasMoreElements method returns false (ie an "empty" enumeration).
If resources could not be listed for some reason, null is returned.</div>
</li>
</ul>
<a name="getProperties(java.net.URL)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getProperties</h4>
<pre>private static java.util.Properties getProperties(java.net.URL url)</pre>
<div class="block">Given a URL that refers to a .properties file, load that file.
This is done under an AccessController so that this method will
succeed when this jarfile is privileged but the caller is not.
This method must therefore remain private to avoid security issues.
<p>
<code>Null</code> is returned if the URL cannot be opened.</div>
</li>
</ul>
<a name="getConfigurationFile(java.lang.ClassLoader, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfigurationFile</h4>
<pre>private static final java.util.Properties getConfigurationFile(java.lang.ClassLoader classLoader,
java.lang.String fileName)</pre>
<div class="block">Locate a user-provided configuration file.
<p>
The classpath of the specified classLoader (usually the context classloader)
is searched for properties files of the specified name. If none is found,
null is returned. If more than one is found, then the file with the greatest
value for its PRIORITY property is returned. If multiple files have the
same PRIORITY value then the first in the classpath is returned.
<p>
This differs from the 1.0.x releases; those always use the first one found.
However as the priority is a new field, this change is backwards compatible.
<p>
The purpose of the priority field is to allow a webserver administrator to
override logging settings in all webapps by placing a commons-logging.properties
file in a shared classpath location with a priority > 0; this overrides any
commons-logging.properties files without priorities which are in the
webapps. Webapps can also use explicit priorities to override a configuration
file in the shared classpath if needed.</div>
</li>
</ul>
<a name="getSystemProperty(java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSystemProperty</h4>
<pre>private static java.lang.String getSystemProperty(java.lang.String key,
java.lang.String def)
throws java.lang.SecurityException</pre>
<div class="block">Read the specified system property, using an AccessController so that
the property can be read if JCL has been granted the appropriate
security rights even if the calling code has not.
<p>
Take care not to expose the value returned by this method to the
calling application in any way; otherwise the calling app can use that
info to access data that should not be available to it.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.SecurityException</code></dd></dl>
</li>
</ul>
<a name="initDiagnostics()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initDiagnostics</h4>
<pre>private static java.io.PrintStream initDiagnostics()</pre>
<div class="block">Determines whether the user wants internal diagnostic output. If so,
returns an appropriate writer object. Users can enable diagnostic
output by setting the system property named <a href="../../../../org/apache/commons/logging/LogFactory.html#DIAGNOSTICS_DEST_PROPERTY"><code>DIAGNOSTICS_DEST_PROPERTY</code></a> to
a filename, or the special values STDOUT or STDERR.</div>
</li>
</ul>
<a name="isDiagnosticsEnabled()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDiagnosticsEnabled</h4>
<pre>protected static boolean isDiagnosticsEnabled()</pre>
<div class="block">Indicates true if the user has enabled internal logging.
<p>
By the way, sorry for the incorrect grammar, but calling this method
areDiagnosticsEnabled just isn't java beans style.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if calls to logDiagnostic will have any effect.</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="logDiagnostic(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logDiagnostic</h4>
<pre>private static final void logDiagnostic(java.lang.String msg)</pre>
<div class="block">Write the specified message to the internal logging destination.
<p>
Note that this method is private; concrete subclasses of this class
should not call it because the diagnosticPrefix string this
method puts in front of all its messages is LogFactory@....,
while subclasses should put SomeSubClass@...
<p>
Subclasses should instead compute their own prefix, then call
logRawDiagnostic. Note that calling isDiagnosticsEnabled is
fine for subclasses.
<p>
Note that it is safe to call this method before initDiagnostics
is called; any output will just be ignored (as isDiagnosticsEnabled
will return false).</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>msg</code> - is the diagnostic message to be output.</dd></dl>
</li>
</ul>
<a name="logRawDiagnostic(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logRawDiagnostic</h4>
<pre>protected static final void logRawDiagnostic(java.lang.String msg)</pre>
<div class="block">Write the specified message to the internal logging destination.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>msg</code> - is the diagnostic message to be output.</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
<a name="logClassLoaderEnvironment(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logClassLoaderEnvironment</h4>
<pre>private static void logClassLoaderEnvironment(java.lang.Class clazz)</pre>
<div class="block">Generate useful diagnostics regarding the classloader tree for
the specified class.
<p>
As an example, if the specified class was loaded via a webapp's
classloader, then you may get the following output:
<pre>
Class com.acme.Foo was loaded via classloader 11111
ClassLoader tree: 11111 -> 22222 (SYSTEM) -> 33333 -> BOOT
</pre>
<p>
This method returns immediately if isDiagnosticsEnabled()
returns false.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>clazz</code> - is the class whose classloader + tree are to be
output.</dd></dl>
</li>
</ul>
<a name="logHierarchy(java.lang.String, java.lang.ClassLoader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>logHierarchy</h4>
<pre>private static void logHierarchy(java.lang.String prefix,
java.lang.ClassLoader classLoader)</pre>
<div class="block">Logs diagnostic messages about the given classloader
and it's hierarchy. The prefix is prepended to the message
and is intended to make it easier to understand the logs.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>prefix</code> - </dd><dd><code>classLoader</code> - </dd></dl>
</li>
</ul>
<a name="objectId(java.lang.Object)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>objectId</h4>
<pre>public static java.lang.String objectId(java.lang.Object o)</pre>
<div class="block">Returns a string that uniquely identifies the specified object, including
its class.
<p>
The returned string is of form "classname@hashcode", ie is the same as
the return value of the Object.toString() method, but works even when
the specified object's class has overidden the toString method.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>o</code> - may be null.</dd>
<dt><span class="strong">Returns:</span></dt><dd>a string of form classname@hashcode, or "null" if param o is null.</dd><dt><span class="strong">Since:</span></dt>
<dd>1.1</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/logging/LogConfigurationException.html" title="class in org.apache.commons.logging"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/commons/logging/LogSource.html" title="class in org.apache.commons.logging"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/logging/LogFactory.html" target="_top">Frames</a></li>
<li><a href="LogFactory.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright 2002-2013 The Apache Software Foundation.<!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.--></small></p>
</body>
</html>
|