| 1 |
<!DOCTYPE html> |
| 2 |
<html lang="en"> |
| 3 |
<head> |
| 4 |
<meta charset="UTF-8"> |
| 5 |
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> |
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 7 |
<meta name="generator" content="Asciidoctor 1.5.8"> |
| 8 |
<meta name="author" content="James R. Perkins"> |
| 9 |
<title>JBoss Logging Tools</title> |
| 10 |
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"> |
| 11 |
<style> |
| 12 |
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */ |
| 13 |
/* Uncomment @import statement below to use as custom stylesheet */ |
| 14 |
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/ |
| 15 |
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block} |
| 16 |
audio,canvas,video{display:inline-block} |
| 17 |
audio:not([controls]){display:none;height:0} |
| 18 |
script{display:none!important} |
| 19 |
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%} |
| 20 |
a{background:transparent} |
| 21 |
a:focus{outline:thin dotted} |
| 22 |
a:active,a:hover{outline:0} |
| 23 |
h1{font-size:2em;margin:.67em 0} |
| 24 |
abbr[title]{border-bottom:1px dotted} |
| 25 |
b,strong{font-weight:bold} |
| 26 |
dfn{font-style:italic} |
| 27 |
hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0} |
| 28 |
mark{background:#ff0;color:#000} |
| 29 |
code,kbd,pre,samp{font-family:monospace;font-size:1em} |
| 30 |
pre{white-space:pre-wrap} |
| 31 |
q{quotes:"\201C" "\201D" "\2018" "\2019"} |
| 32 |
small{font-size:80%} |
| 33 |
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} |
| 34 |
sup{top:-.5em} |
| 35 |
sub{bottom:-.25em} |
| 36 |
img{border:0} |
| 37 |
svg:not(:root){overflow:hidden} |
| 38 |
figure{margin:0} |
| 39 |
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em} |
| 40 |
legend{border:0;padding:0} |
| 41 |
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0} |
| 42 |
button,input{line-height:normal} |
| 43 |
button,select{text-transform:none} |
| 44 |
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer} |
| 45 |
button[disabled],html input[disabled]{cursor:default} |
| 46 |
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0} |
| 47 |
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0} |
| 48 |
textarea{overflow:auto;vertical-align:top} |
| 49 |
table{border-collapse:collapse;border-spacing:0} |
| 50 |
*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box} |
| 51 |
html,body{font-size:100%} |
| 52 |
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased} |
| 53 |
a:hover{cursor:pointer} |
| 54 |
img,object,embed{max-width:100%;height:auto} |
| 55 |
object,embed{height:100%} |
| 56 |
img{-ms-interpolation-mode:bicubic} |
| 57 |
.left{float:left!important} |
| 58 |
.right{float:right!important} |
| 59 |
.text-left{text-align:left!important} |
| 60 |
.text-right{text-align:right!important} |
| 61 |
.text-center{text-align:center!important} |
| 62 |
.text-justify{text-align:justify!important} |
| 63 |
.hide{display:none} |
| 64 |
img,object,svg{display:inline-block;vertical-align:middle} |
| 65 |
textarea{height:auto;min-height:50px} |
| 66 |
select{width:100%} |
| 67 |
.center{margin-left:auto;margin-right:auto} |
| 68 |
.stretch{width:100%} |
| 69 |
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em} |
| 70 |
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr} |
| 71 |
a{color:#2156a5;text-decoration:underline;line-height:inherit} |
| 72 |
a:hover,a:focus{color:#1d4b8f} |
| 73 |
a img{border:none} |
| 74 |
p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility} |
| 75 |
p aside{font-size:.875em;line-height:1.35;font-style:italic} |
| 76 |
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em} |
| 77 |
h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0} |
| 78 |
h1{font-size:2.125em} |
| 79 |
h2{font-size:1.6875em} |
| 80 |
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em} |
| 81 |
h4,h5{font-size:1.125em} |
| 82 |
h6{font-size:1em} |
| 83 |
hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0} |
| 84 |
em,i{font-style:italic;line-height:inherit} |
| 85 |
strong,b{font-weight:bold;line-height:inherit} |
| 86 |
small{font-size:60%;line-height:inherit} |
| 87 |
code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)} |
| 88 |
ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} |
| 89 |
ul,ol{margin-left:1.5em} |
| 90 |
ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em} |
| 91 |
ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} |
| 92 |
ul.square{list-style-type:square} |
| 93 |
ul.circle{list-style-type:circle} |
| 94 |
ul.disc{list-style-type:disc} |
| 95 |
ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} |
| 96 |
dl dt{margin-bottom:.3125em;font-weight:bold} |
| 97 |
dl dd{margin-bottom:1.25em} |
| 98 |
abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help} |
| 99 |
abbr{text-transform:none} |
| 100 |
blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd} |
| 101 |
blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)} |
| 102 |
blockquote cite::before{content:"\2014 \0020"} |
| 103 |
blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)} |
| 104 |
blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)} |
| 105 |
@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2} |
| 106 |
h1{font-size:2.75em} |
| 107 |
h2{font-size:2.3125em} |
| 108 |
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em} |
| 109 |
h4{font-size:1.4375em}} |
| 110 |
table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede} |
| 111 |
table thead,table tfoot{background:#f7f8f7} |
| 112 |
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left} |
| 113 |
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)} |
| 114 |
table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7} |
| 115 |
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6} |
| 116 |
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em} |
| 117 |
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400} |
| 118 |
.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table} |
| 119 |
.clearfix::after,.float-group::after{clear:both} |
| 120 |
*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word} |
| 121 |
*:not(pre)>code.nobreak{word-wrap:normal} |
| 122 |
*:not(pre)>code.nowrap{white-space:nowrap} |
| 123 |
pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed} |
| 124 |
em em{font-style:normal} |
| 125 |
strong strong{font-weight:400} |
| 126 |
.keyseq{color:rgba(51,51,51,.8)} |
| 127 |
kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap} |
| 128 |
.keyseq kbd:first-child{margin-left:0} |
| 129 |
.keyseq kbd:last-child{margin-right:0} |
| 130 |
.menuseq,.menuref{color:#000} |
| 131 |
.menuseq b:not(.caret),.menuref{font-weight:inherit} |
| 132 |
.menuseq{word-spacing:-.02em} |
| 133 |
.menuseq b.caret{font-size:1.25em;line-height:.8} |
| 134 |
.menuseq i.caret{font-weight:bold;text-align:center;width:.45em} |
| 135 |
b.button::before,b.button::after{position:relative;top:-1px;font-weight:400} |
| 136 |
b.button::before{content:"[";padding:0 3px 0 2px} |
| 137 |
b.button::after{content:"]";padding:0 2px 0 3px} |
| 138 |
p a>code:hover{color:rgba(0,0,0,.9)} |
| 139 |
#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} |
| 140 |
#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table} |
| 141 |
#header::after,#content::after,#footnotes::after,#footer::after{clear:both} |
| 142 |
#content{margin-top:1.25em} |
| 143 |
#content::before{content:none} |
| 144 |
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} |
| 145 |
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf} |
| 146 |
#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px} |
| 147 |
#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap} |
| 148 |
#header .details span:first-child{margin-left:-.125em} |
| 149 |
#header .details span.email a{color:rgba(0,0,0,.85)} |
| 150 |
#header .details br{display:none} |
| 151 |
#header .details br+span::before{content:"\00a0\2013\00a0"} |
| 152 |
#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)} |
| 153 |
#header .details br+span#revremark::before{content:"\00a0|\00a0"} |
| 154 |
#header #revnumber{text-transform:capitalize} |
| 155 |
#header #revnumber::after{content:"\00a0"} |
| 156 |
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem} |
| 157 |
#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em} |
| 158 |
#toc>ul{margin-left:.125em} |
| 159 |
#toc ul.sectlevel0>li>a{font-style:italic} |
| 160 |
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0} |
| 161 |
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none} |
| 162 |
#toc li{line-height:1.3334;margin-top:.3334em} |
| 163 |
#toc a{text-decoration:none} |
| 164 |
#toc a:active{text-decoration:underline} |
| 165 |
#toctitle{color:#7a2518;font-size:1.2em} |
| 166 |
@media screen and (min-width:768px){#toctitle{font-size:1.375em} |
| 167 |
body.toc2{padding-left:15em;padding-right:0} |
| 168 |
#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto} |
| 169 |
#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em} |
| 170 |
#toc.toc2>ul{font-size:.9em;margin-bottom:0} |
| 171 |
#toc.toc2 ul ul{margin-left:0;padding-left:1em} |
| 172 |
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em} |
| 173 |
body.toc2.toc-right{padding-left:0;padding-right:15em} |
| 174 |
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}} |
| 175 |
@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0} |
| 176 |
#toc.toc2{width:20em} |
| 177 |
#toc.toc2 #toctitle{font-size:1.375em} |
| 178 |
#toc.toc2>ul{font-size:.95em} |
| 179 |
#toc.toc2 ul ul{padding-left:1.25em} |
| 180 |
body.toc2.toc-right{padding-left:0;padding-right:20em}} |
| 181 |
#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} |
| 182 |
#content #toc>:first-child{margin-top:0} |
| 183 |
#content #toc>:last-child{margin-bottom:0} |
| 184 |
#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em} |
| 185 |
#footer-text{color:rgba(255,255,255,.8);line-height:1.44} |
| 186 |
#content{margin-bottom:.625em} |
| 187 |
.sect1{padding-bottom:.625em} |
| 188 |
@media screen and (min-width:768px){#content{margin-bottom:1.25em} |
| 189 |
.sect1{padding-bottom:1.25em}} |
| 190 |
.sect1:last-child{padding-bottom:0} |
| 191 |
.sect1+.sect1{border-top:1px solid #e7e7e9} |
| 192 |
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400} |
| 193 |
#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em} |
| 194 |
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible} |
| 195 |
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none} |
| 196 |
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221} |
| 197 |
.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em} |
| 198 |
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic} |
| 199 |
table.tableblock.fit-content>caption.title{white-space:nowrap;width:0} |
| 200 |
.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)} |
| 201 |
table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit} |
| 202 |
.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%} |
| 203 |
.admonitionblock>table td.icon{text-align:center;width:80px} |
| 204 |
.admonitionblock>table td.icon img{max-width:none} |
| 205 |
.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase} |
| 206 |
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6)} |
| 207 |
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} |
| 208 |
.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px} |
| 209 |
.exampleblock>.content>:first-child{margin-top:0} |
| 210 |
.exampleblock>.content>:last-child{margin-bottom:0} |
| 211 |
.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px} |
| 212 |
.sidebarblock>:first-child{margin-top:0} |
| 213 |
.sidebarblock>:last-child{margin-bottom:0} |
| 214 |
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} |
| 215 |
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} |
| 216 |
.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8} |
| 217 |
.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1} |
| 218 |
.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;overflow-x:auto;padding:1em;font-size:.8125em} |
| 219 |
@media screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}} |
| 220 |
@media screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}} |
| 221 |
.literalblock pre.nowrap,.literalblock pre.nowrap pre,.listingblock pre.nowrap,.listingblock pre.nowrap pre{white-space:pre;word-wrap:normal} |
| 222 |
.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)} |
| 223 |
.listingblock pre.highlightjs{padding:0} |
| 224 |
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px} |
| 225 |
.listingblock pre.prettyprint{border-width:0} |
| 226 |
.listingblock>.content{position:relative} |
| 227 |
.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999} |
| 228 |
.listingblock:hover code[data-lang]::before{display:block} |
| 229 |
.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:#999} |
| 230 |
.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"} |
| 231 |
table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none} |
| 232 |
table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45} |
| 233 |
table.pyhltable td.code{padding-left:.75em;padding-right:0} |
| 234 |
pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #dddddf} |
| 235 |
pre.pygments .lineno{display:inline-block;margin-right:.25em} |
| 236 |
table.pyhltable .linenodiv{background:none!important;padding-right:0!important} |
| 237 |
.quoteblock{margin:0 1em 1.25em 1.5em;display:table} |
| 238 |
.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em} |
| 239 |
.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify} |
| 240 |
.quoteblock blockquote{margin:0;padding:0;border:0} |
| 241 |
.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)} |
| 242 |
.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0} |
| 243 |
.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right} |
| 244 |
.verseblock{margin:0 1em 1.25em} |
| 245 |
.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility} |
| 246 |
.verseblock pre strong{font-weight:400} |
| 247 |
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex} |
| 248 |
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic} |
| 249 |
.quoteblock .attribution br,.verseblock .attribution br{display:none} |
| 250 |
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)} |
| 251 |
.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none} |
| 252 |
.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0} |
| 253 |
.quoteblock.abstract{margin:0 1em 1.25em;display:block} |
| 254 |
.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center} |
| 255 |
.quoteblock.excerpt,.quoteblock .quoteblock{margin:0 0 1.25em;padding:0 0 .25em 1em;border-left:.25em solid #dddddf} |
| 256 |
.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem} |
| 257 |
.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0} |
| 258 |
table.tableblock{max-width:100%;border-collapse:separate} |
| 259 |
p.tableblock:last-child{margin-bottom:0} |
| 260 |
td.tableblock>.content{margin-bottom:-1.25em} |
| 261 |
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede} |
| 262 |
table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0} |
| 263 |
table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0} |
| 264 |
table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0} |
| 265 |
table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px} |
| 266 |
table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0} |
| 267 |
table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0} |
| 268 |
table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0} |
| 269 |
table.frame-all{border-width:1px} |
| 270 |
table.frame-sides{border-width:0 1px} |
| 271 |
table.frame-topbot,table.frame-ends{border-width:1px 0} |
| 272 |
table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd){background:#f8f8f7} |
| 273 |
table.stripes-none tr,table.stripes-odd tr:nth-of-type(even){background:none} |
| 274 |
th.halign-left,td.halign-left{text-align:left} |
| 275 |
th.halign-right,td.halign-right{text-align:right} |
| 276 |
th.halign-center,td.halign-center{text-align:center} |
| 277 |
th.valign-top,td.valign-top{vertical-align:top} |
| 278 |
th.valign-bottom,td.valign-bottom{vertical-align:bottom} |
| 279 |
th.valign-middle,td.valign-middle{vertical-align:middle} |
| 280 |
table thead th,table tfoot th{font-weight:bold} |
| 281 |
tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7} |
| 282 |
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold} |
| 283 |
p.tableblock>code:only-child{background:none;padding:0} |
| 284 |
p.tableblock{font-size:1em} |
| 285 |
td>div.verse{white-space:pre} |
| 286 |
ol{margin-left:1.75em} |
| 287 |
ul li ol{margin-left:1.5em} |
| 288 |
dl dd{margin-left:1.125em} |
| 289 |
dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0} |
| 290 |
ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em} |
| 291 |
ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none} |
| 292 |
ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em} |
| 293 |
ul.unstyled,ol.unstyled{margin-left:0} |
| 294 |
ul.checklist{margin-left:.625em} |
| 295 |
ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em} |
| 296 |
ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em} |
| 297 |
ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em} |
| 298 |
ul.inline>li{margin-left:1.25em} |
| 299 |
.unstyled dl dt{font-weight:400;font-style:normal} |
| 300 |
ol.arabic{list-style-type:decimal} |
| 301 |
ol.decimal{list-style-type:decimal-leading-zero} |
| 302 |
ol.loweralpha{list-style-type:lower-alpha} |
| 303 |
ol.upperalpha{list-style-type:upper-alpha} |
| 304 |
ol.lowerroman{list-style-type:lower-roman} |
| 305 |
ol.upperroman{list-style-type:upper-roman} |
| 306 |
ol.lowergreek{list-style-type:lower-greek} |
| 307 |
.hdlist>table,.colist>table{border:0;background:none} |
| 308 |
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none} |
| 309 |
td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em} |
| 310 |
td.hdlist1{font-weight:bold;padding-bottom:1.25em} |
| 311 |
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em} |
| 312 |
.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top} |
| 313 |
.colist td:not([class]):first-child img{max-width:none} |
| 314 |
.colist td:not([class]):last-child{padding:.25em 0} |
| 315 |
.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd} |
| 316 |
.imageblock.left{margin:.25em .625em 1.25em 0} |
| 317 |
.imageblock.right{margin:.25em 0 1.25em .625em} |
| 318 |
.imageblock>.title{margin-bottom:0} |
| 319 |
.imageblock.thumb,.imageblock.th{border-width:6px} |
| 320 |
.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em} |
| 321 |
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0} |
| 322 |
.image.left{margin-right:.625em} |
| 323 |
.image.right{margin-left:.625em} |
| 324 |
a.image{text-decoration:none;display:inline-block} |
| 325 |
a.image object{pointer-events:none} |
| 326 |
sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super} |
| 327 |
sup.footnote a,sup.footnoteref a{text-decoration:none} |
| 328 |
sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline} |
| 329 |
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em} |
| 330 |
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0} |
| 331 |
#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em} |
| 332 |
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em} |
| 333 |
#footnotes .footnote:last-of-type{margin-bottom:0} |
| 334 |
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0} |
| 335 |
.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0} |
| 336 |
.gist .file-data>table td.line-data{width:99%} |
| 337 |
div.unbreakable{page-break-inside:avoid} |
| 338 |
.big{font-size:larger} |
| 339 |
.small{font-size:smaller} |
| 340 |
.underline{text-decoration:underline} |
| 341 |
.overline{text-decoration:overline} |
| 342 |
.line-through{text-decoration:line-through} |
| 343 |
.aqua{color:#00bfbf} |
| 344 |
.aqua-background{background-color:#00fafa} |
| 345 |
.black{color:#000} |
| 346 |
.black-background{background-color:#000} |
| 347 |
.blue{color:#0000bf} |
| 348 |
.blue-background{background-color:#0000fa} |
| 349 |
.fuchsia{color:#bf00bf} |
| 350 |
.fuchsia-background{background-color:#fa00fa} |
| 351 |
.gray{color:#606060} |
| 352 |
.gray-background{background-color:#7d7d7d} |
| 353 |
.green{color:#006000} |
| 354 |
.green-background{background-color:#007d00} |
| 355 |
.lime{color:#00bf00} |
| 356 |
.lime-background{background-color:#00fa00} |
| 357 |
.maroon{color:#600000} |
| 358 |
.maroon-background{background-color:#7d0000} |
| 359 |
.navy{color:#000060} |
| 360 |
.navy-background{background-color:#00007d} |
| 361 |
.olive{color:#606000} |
| 362 |
.olive-background{background-color:#7d7d00} |
| 363 |
.purple{color:#600060} |
| 364 |
.purple-background{background-color:#7d007d} |
| 365 |
.red{color:#bf0000} |
| 366 |
.red-background{background-color:#fa0000} |
| 367 |
.silver{color:#909090} |
| 368 |
.silver-background{background-color:#bcbcbc} |
| 369 |
.teal{color:#006060} |
| 370 |
.teal-background{background-color:#007d7d} |
| 371 |
.white{color:#bfbfbf} |
| 372 |
.white-background{background-color:#fafafa} |
| 373 |
.yellow{color:#bfbf00} |
| 374 |
.yellow-background{background-color:#fafa00} |
| 375 |
span.icon>.fa{cursor:default} |
| 376 |
a span.icon>.fa{cursor:inherit} |
| 377 |
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default} |
| 378 |
.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c} |
| 379 |
.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111} |
| 380 |
.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900} |
| 381 |
.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400} |
| 382 |
.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000} |
| 383 |
.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold} |
| 384 |
.conum[data-value] *{color:#fff!important} |
| 385 |
.conum[data-value]+b{display:none} |
| 386 |
.conum[data-value]::after{content:attr(data-value)} |
| 387 |
pre .conum[data-value]{position:relative;top:-.125em} |
| 388 |
b.conum *{color:inherit!important} |
| 389 |
.conum:not([data-value]):empty{display:none} |
| 390 |
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility} |
| 391 |
h1,h2,p,td.content,span.alt{letter-spacing:-.01em} |
| 392 |
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em} |
| 393 |
p,blockquote,dt,td.content,span.alt{font-size:1.0625rem} |
| 394 |
p{margin-bottom:1.25rem} |
| 395 |
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} |
| 396 |
.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc} |
| 397 |
.print-only{display:none!important} |
| 398 |
@page{margin:1.25cm .75cm} |
| 399 |
@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important} |
| 400 |
html{font-size:80%} |
| 401 |
a{color:inherit!important;text-decoration:underline!important} |
| 402 |
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important} |
| 403 |
a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em} |
| 404 |
abbr[title]::after{content:" (" attr(title) ")"} |
| 405 |
pre,blockquote,tr,img,object,svg{page-break-inside:avoid} |
| 406 |
thead{display:table-header-group} |
| 407 |
svg{max-width:100%} |
| 408 |
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} |
| 409 |
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} |
| 410 |
#toc,.sidebarblock,.exampleblock>.content{background:none!important} |
| 411 |
#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important} |
| 412 |
body.book #header{text-align:center} |
| 413 |
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em} |
| 414 |
body.book #header .details{border:0!important;display:block;padding:0!important} |
| 415 |
body.book #header .details span:first-child{margin-left:0!important} |
| 416 |
body.book #header .details br{display:block} |
| 417 |
body.book #header .details br+span::before{content:none!important} |
| 418 |
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important} |
| 419 |
body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always} |
| 420 |
.listingblock code[data-lang]::before{display:block} |
| 421 |
#footer{padding:0 .9375em} |
| 422 |
.hide-on-print{display:none!important} |
| 423 |
.print-only{display:block!important} |
| 424 |
.hide-for-print{display:none!important} |
| 425 |
.show-for-print{display:inherit!important}} |
| 426 |
@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem} |
| 427 |
.sect1{padding:0!important} |
| 428 |
.sect1+.sect1{border:0} |
| 429 |
#footer{background:none} |
| 430 |
#footer-text{color:rgba(0,0,0,.6);font-size:.9em}} |
| 431 |
@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}} |
| 432 |
</style> |
| 433 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> |
| 434 |
<style> |
| 435 |
/* Stylesheet for CodeRay to match GitHub theme | MIT License | http://foundation.zurb.com */ |
| 436 |
/*pre.CodeRay {background-color:#f7f7f8;}*/ |
| 437 |
.CodeRay .line-numbers{border-right:1px solid #d8d8d8;padding:0 0.5em 0 .25em} |
| 438 |
.CodeRay span.line-numbers{display:inline-block;margin-right:.5em;color:rgba(0,0,0,.3)} |
| 439 |
.CodeRay .line-numbers strong{color:rgba(0,0,0,.4)} |
| 440 |
table.CodeRay{border-collapse:separate;border-spacing:0;margin-bottom:0;border:0;background:none} |
| 441 |
table.CodeRay td{vertical-align: top;line-height:1.45} |
| 442 |
table.CodeRay td.line-numbers{text-align:right} |
| 443 |
table.CodeRay td.line-numbers>pre{padding:0;color:rgba(0,0,0,.3)} |
| 444 |
table.CodeRay td.code{padding:0 0 0 .5em} |
| 445 |
table.CodeRay td.code>pre{padding:0} |
| 446 |
.CodeRay .debug{color:#fff !important;background:#000080 !important} |
| 447 |
.CodeRay .annotation{color:#007} |
| 448 |
.CodeRay .attribute-name{color:#000080} |
| 449 |
.CodeRay .attribute-value{color:#700} |
| 450 |
.CodeRay .binary{color:#509} |
| 451 |
.CodeRay .comment{color:#998;font-style:italic} |
| 452 |
.CodeRay .char{color:#04d} |
| 453 |
.CodeRay .char .content{color:#04d} |
| 454 |
.CodeRay .char .delimiter{color:#039} |
| 455 |
.CodeRay .class{color:#458;font-weight:bold} |
| 456 |
.CodeRay .complex{color:#a08} |
| 457 |
.CodeRay .constant,.CodeRay .predefined-constant{color:#008080} |
| 458 |
.CodeRay .color{color:#099} |
| 459 |
.CodeRay .class-variable{color:#369} |
| 460 |
.CodeRay .decorator{color:#b0b} |
| 461 |
.CodeRay .definition{color:#099} |
| 462 |
.CodeRay .delimiter{color:#000} |
| 463 |
.CodeRay .doc{color:#970} |
| 464 |
.CodeRay .doctype{color:#34b} |
| 465 |
.CodeRay .doc-string{color:#d42} |
| 466 |
.CodeRay .escape{color:#666} |
| 467 |
.CodeRay .entity{color:#800} |
| 468 |
.CodeRay .error{color:#808} |
| 469 |
.CodeRay .exception{color:inherit} |
| 470 |
.CodeRay .filename{color:#099} |
| 471 |
.CodeRay .function{color:#900;font-weight:bold} |
| 472 |
.CodeRay .global-variable{color:#008080} |
| 473 |
.CodeRay .hex{color:#058} |
| 474 |
.CodeRay .integer,.CodeRay .float{color:#099} |
| 475 |
.CodeRay .include{color:#555} |
| 476 |
.CodeRay .inline{color:#000} |
| 477 |
.CodeRay .inline .inline{background:#ccc} |
| 478 |
.CodeRay .inline .inline .inline{background:#bbb} |
| 479 |
.CodeRay .inline .inline-delimiter{color:#d14} |
| 480 |
.CodeRay .inline-delimiter{color:#d14} |
| 481 |
.CodeRay .important{color:#555;font-weight:bold} |
| 482 |
.CodeRay .interpreted{color:#b2b} |
| 483 |
.CodeRay .instance-variable{color:#008080} |
| 484 |
.CodeRay .label{color:#970} |
| 485 |
.CodeRay .local-variable{color:#963} |
| 486 |
.CodeRay .octal{color:#40e} |
| 487 |
.CodeRay .predefined{color:#369} |
| 488 |
.CodeRay .preprocessor{color:#579} |
| 489 |
.CodeRay .pseudo-class{color:#555} |
| 490 |
.CodeRay .directive{font-weight:bold} |
| 491 |
.CodeRay .type{font-weight:bold} |
| 492 |
.CodeRay .predefined-type{color:inherit} |
| 493 |
.CodeRay .reserved,.CodeRay .keyword {color:#000;font-weight:bold} |
| 494 |
.CodeRay .key{color:#808} |
| 495 |
.CodeRay .key .delimiter{color:#606} |
| 496 |
.CodeRay .key .char{color:#80f} |
| 497 |
.CodeRay .value{color:#088} |
| 498 |
.CodeRay .regexp .delimiter{color:#808} |
| 499 |
.CodeRay .regexp .content{color:#808} |
| 500 |
.CodeRay .regexp .modifier{color:#808} |
| 501 |
.CodeRay .regexp .char{color:#d14} |
| 502 |
.CodeRay .regexp .function{color:#404;font-weight:bold} |
| 503 |
.CodeRay .string{color:#d20} |
| 504 |
.CodeRay .string .string .string{background:#ffd0d0} |
| 505 |
.CodeRay .string .content{color:#d14} |
| 506 |
.CodeRay .string .char{color:#d14} |
| 507 |
.CodeRay .string .delimiter{color:#d14} |
| 508 |
.CodeRay .shell{color:#d14} |
| 509 |
.CodeRay .shell .delimiter{color:#d14} |
| 510 |
.CodeRay .symbol{color:#990073} |
| 511 |
.CodeRay .symbol .content{color:#a60} |
| 512 |
.CodeRay .symbol .delimiter{color:#630} |
| 513 |
.CodeRay .tag{color:#008080} |
| 514 |
.CodeRay .tag-special{color:#d70} |
| 515 |
.CodeRay .variable{color:#036} |
| 516 |
.CodeRay .insert{background:#afa} |
| 517 |
.CodeRay .delete{background:#faa} |
| 518 |
.CodeRay .change{color:#aaf;background:#007} |
| 519 |
.CodeRay .head{color:#f8f;background:#505} |
| 520 |
.CodeRay .insert .insert{color:#080} |
| 521 |
.CodeRay .delete .delete{color:#800} |
| 522 |
.CodeRay .change .change{color:#66f} |
| 523 |
.CodeRay .head .head{color:#f4f} |
| 524 |
</style> |
| 525 |
</head> |
| 526 |
<body class="article toc2 toc-left"> |
| 527 |
<div id="header"> |
| 528 |
<h1>JBoss Logging Tools</h1> |
| 529 |
<div class="details"> |
| 530 |
<span id="author" class="author">James R. Perkins</span><br> |
| 531 |
<span id="email" class="email"><<a href="mailto:[email protected]">[email protected]</a>></span><br> |
| 532 |
<span id="revnumber">version 2.2.1.Final</span> |
| 533 |
</div> |
| 534 |
<div id="toc" class="toc2"> |
| 535 |
<div id="toctitle">Table of Contents</div> |
| 536 |
<ul class="sectlevel1"> |
| 537 |
<li><a href="#introduction">Introduction</a></li> |
| 538 |
<li><a href="#getting-started">Getting Started</a></li> |
| 539 |
<li><a href="#message-bundle-interfaces">Message Bundle Interfaces</a> |
| 540 |
<ul class="sectlevel2"> |
| 541 |
<li><a href="#example-message-bundle">Example Message Bundle</a></li> |
| 542 |
</ul> |
| 543 |
</li> |
| 544 |
<li><a href="#message-logger-interfaces">Message Logger Interfaces</a> |
| 545 |
<ul class="sectlevel2"> |
| 546 |
<li><a href="#example-message-logger">Example Message Logger</a></li> |
| 547 |
</ul> |
| 548 |
</li> |
| 549 |
<li><a href="#reports">Reports</a> |
| 550 |
<ul class="sectlevel2"> |
| 551 |
<li><a href="#annotations">Annotations</a></li> |
| 552 |
</ul> |
| 553 |
</li> |
| 554 |
<li><a href="#example-use-cases">Example Use Cases</a></li> |
| 555 |
<li><a href="#translation-property-files">Translation Property Files</a></li> |
| 556 |
<li><a href="#annotation-processor-options">Annotation Processor Options</a> |
| 557 |
<ul class="sectlevel2"> |
| 558 |
<li><a href="#general">General</a></li> |
| 559 |
<li><a href="#translation-options">Translation Options</a></li> |
| 560 |
<li><a href="#report-options">Report Options</a></li> |
| 561 |
</ul> |
| 562 |
</li> |
| 563 |
</ul> |
| 564 |
</div> |
| 565 |
</div> |
| 566 |
<div id="content"> |
| 567 |
<div class="sect1"> |
| 568 |
<h2 id="introduction"><a class="anchor" href="#introduction"></a>Introduction</h2> |
| 569 |
<div class="sectionbody"> |
| 570 |
<div class="paragraph"> |
| 571 |
<p>The JBoss logging tools are used to create internationalized log statements and exceptions.</p> |
| 572 |
</div> |
| 573 |
</div> |
| 574 |
</div> |
| 575 |
<div class="sect1"> |
| 576 |
<h2 id="getting-started"><a class="anchor" href="#getting-started"></a>Getting Started</h2> |
| 577 |
<div class="sectionbody"> |
| 578 |
<div class="paragraph"> |
| 579 |
<p>To get started you need to include three dependencies in your project.</p> |
| 580 |
</div> |
| 581 |
<table class="tableblock frame-none grid-none stretch"> |
| 582 |
<colgroup> |
| 583 |
<col style="width: 50%;"> |
| 584 |
<col style="width: 50%;"> |
| 585 |
</colgroup> |
| 586 |
<tbody> |
| 587 |
<tr> |
| 588 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://repository.jboss.org/org/jboss/logging/jboss-logging/">JBoss Logging</a></p></td> |
| 589 |
<td class="tableblock halign-left valign-top"><p class="tableblock">Required at compile time and runtime.</p></td> |
| 590 |
</tr> |
| 591 |
<tr> |
| 592 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://repository.jboss.org/org/jboss/logging/jboss-logging-annotations/">JBoss Logging Annotations</a></p></td> |
| 593 |
<td class="tableblock halign-left valign-top"><p class="tableblock">Required at compile time only.</p></td> |
| 594 |
</tr> |
| 595 |
<tr> |
| 596 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="https://repository.jboss.org/org/jboss/logging/jboss-logging-processor/">JBoss Logging Processor</a></p></td> |
| 597 |
<td class="tableblock halign-left valign-top"><p class="tableblock">Required at compile time only.</p></td> |
| 598 |
</tr> |
| 599 |
</tbody> |
| 600 |
</table> |
| 601 |
<div class="paragraph"> |
| 602 |
<p>If you’re using maven here is an example <code>pom.xml</code> snippet:</p> |
| 603 |
</div> |
| 604 |
<div class="listingblock"> |
| 605 |
<div class="content"> |
| 606 |
<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag"><dependencies></span> |
| 607 |
<span class="comment"><!-- Required by the annotation processor and will be used at runtime --></span> |
| 608 |
<span class="tag"><dependency></span> |
| 609 |
<span class="tag"><groupId></span>org.jboss.logging<span class="tag"></groupId></span> |
| 610 |
<span class="tag"><artifactId></span>jboss-logging<span class="tag"></artifactId></span> |
| 611 |
<span class="tag"></dependency></span> |
| 612 |
|
| 613 |
<span class="tag"><dependency></span> |
| 614 |
<span class="tag"><groupId></span>org.jboss.logging<span class="tag"></groupId></span> |
| 615 |
<span class="tag"><artifactId></span>jboss-logging-annotations<span class="tag"></artifactId></span> |
| 616 |
<span class="tag"><version></span>2.2.1.Final<span class="tag"></version></span> |
| 617 |
<span class="comment"><!-- This is a compile-time dependency of this project, but is not needed at compile or runtime by other |
| 618 |
projects that depend on this project.--></span> |
| 619 |
<span class="tag"><scope></span>provided<span class="tag"></scope></span> |
| 620 |
<span class="tag"><optional></span>true<span class="tag"></optional></span> |
| 621 |
<span class="tag"></dependency></span> |
| 622 |
|
| 623 |
<span class="tag"><dependency></span> |
| 624 |
<span class="tag"><groupId></span>org.jboss.logging<span class="tag"></groupId></span> |
| 625 |
<span class="tag"><artifactId></span>jboss-logging-processor<span class="tag"></artifactId></span> |
| 626 |
<span class="tag"><version></span>2.2.1.Final<span class="tag"></version></span> |
| 627 |
<span class="comment"><!-- This is a compile-time dependency of this project, but is not needed at compile or runtime by other |
| 628 |
projects that depend on this project.--></span> |
| 629 |
<span class="tag"><scope></span>provided<span class="tag"></scope></span> |
| 630 |
<span class="tag"><optional></span>true<span class="tag"></optional></span> |
| 631 |
<span class="tag"></dependency></span> |
| 632 |
<span class="tag"></dependencies></span></code></pre> |
| 633 |
</div> |
| 634 |
</div> |
| 635 |
<div class="paragraph"> |
| 636 |
<p>Once your project is configured you can create either a <a href="#message-bundle-interfaces">message bundle interface</a> or a <a href="#message-logger-interfaces">message logger interface</a>. For detailed information see the <a href="apidocs/index.html">JavaDocs</a> for the annotations.</p> |
| 637 |
</div> |
| 638 |
</div> |
| 639 |
</div> |
| 640 |
<div class="sect1"> |
| 641 |
<h2 id="message-bundle-interfaces"><a class="anchor" href="#message-bundle-interfaces"></a>Message Bundle Interfaces</h2> |
| 642 |
<div class="sectionbody"> |
| 643 |
<div class="paragraph"> |
| 644 |
<p>Message bundle interfaces provide a way to internationalize exceptions or strings. A message bundle interface is |
| 645 |
annotated with <a href="apidocs"><code>@MessageBundle</code></a>. Each method in must be annotated with <a href="apidocs"><code>@Message</code></a> |
| 646 |
which will be used to determine the String used for either the return type or the message for the exception being |
| 647 |
returned.</p> |
| 648 |
</div> |
| 649 |
<div class="paragraph"> |
| 650 |
<p>The value for a <a href="apidocs"><code>@Message</code></a> may contain an expression.</p> |
| 651 |
</div> |
| 652 |
<div class="admonitionblock note"> |
| 653 |
<table> |
| 654 |
<tr> |
| 655 |
<td class="icon"> |
| 656 |
<i class="fa icon-note" title="Note"></i> |
| 657 |
</td> |
| 658 |
<td class="content"> |
| 659 |
Expressions are in the form of <code>${key:defaultValue}</code>. If the key is prefixed with <code>sys.</code> a system property is |
| 660 |
used. If the key is prefixed with <code>env.</code> an environment variable is used. In all other cases the properties are resolved |
| 661 |
from the <code>org.jboss.logging.tools.expressionProperties</code> path. If the key is not found in the properties the default |
| 662 |
value will be used. |
| 663 |
</td> |
| 664 |
</tr> |
| 665 |
</table> |
| 666 |
</div> |
| 667 |
<div class="admonitionblock important"> |
| 668 |
<table> |
| 669 |
<tr> |
| 670 |
<td class="icon"> |
| 671 |
<i class="fa icon-important" title="Important"></i> |
| 672 |
</td> |
| 673 |
<td class="content"> |
| 674 |
Expressions are processed at compile time. The values will be hard-coded in the generated source files. |
| 675 |
</td> |
| 676 |
</tr> |
| 677 |
</table> |
| 678 |
</div> |
| 679 |
<div class="paragraph"> |
| 680 |
<p>The following constraints are placed on methods in a message bundle:</p> |
| 681 |
</div> |
| 682 |
<div class="ulist"> |
| 683 |
<ul> |
| 684 |
<li> |
| 685 |
<p>The return type must be one of the follow</p> |
| 686 |
<div class="ulist"> |
| 687 |
<ul> |
| 688 |
<li> |
| 689 |
<p>A <code>java.lang.String</code></p> |
| 690 |
</li> |
| 691 |
<li> |
| 692 |
<p>A <code>java.lang.Throwable</code> or a subtype of <code>java.lang.Throwable</code></p> |
| 693 |
</li> |
| 694 |
<li> |
| 695 |
<p>A <code>java.lang.function.Supplier</code> who’s return type fits one of the other two constraints above.</p> |
| 696 |
</li> |
| 697 |
</ul> |
| 698 |
</div> |
| 699 |
</li> |
| 700 |
<li> |
| 701 |
<p>The method must be annotated with <a href="apidocs"><code>@Message</code></a> or a message must be inheritable.</p> |
| 702 |
</li> |
| 703 |
<li> |
| 704 |
<p>A method can have only one <a href="apidocs"><code>@Cause</code></a> parameter.</p> |
| 705 |
</li> |
| 706 |
<li> |
| 707 |
<p>A method can only have one <a href="apidocs"><code>@Producer</code></a> parameter.</p> |
| 708 |
</li> |
| 709 |
</ul> |
| 710 |
</div> |
| 711 |
<div class="admonitionblock note"> |
| 712 |
<table> |
| 713 |
<tr> |
| 714 |
<td class="icon"> |
| 715 |
<i class="fa icon-note" title="Note"></i> |
| 716 |
</td> |
| 717 |
<td class="content"> |
| 718 |
A message is inheritable if the two methods have the same name and same number of format parameters. |
| 719 |
</td> |
| 720 |
</tr> |
| 721 |
</table> |
| 722 |
</div> |
| 723 |
<div class="admonitionblock note"> |
| 724 |
<table> |
| 725 |
<tr> |
| 726 |
<td class="icon"> |
| 727 |
<i class="fa icon-note" title="Note"></i> |
| 728 |
</td> |
| 729 |
<td class="content"> |
| 730 |
A format parameter is a parameter that has no annotations or is annotated with one of the following annotations; <a href="apidocs"><code>@FormatWith</code></a>, <a href="apidocs"><code>@Pos</code></a> or <a href="apidocs"><code>@Transform</code></a>. |
| 731 |
</td> |
| 732 |
</tr> |
| 733 |
</table> |
| 734 |
</div> |
| 735 |
<div class="sect2"> |
| 736 |
<h3 id="example-message-bundle"><a class="anchor" href="#example-message-bundle"></a>Example Message Bundle</h3> |
| 737 |
<div class="listingblock"> |
| 738 |
<div class="content"> |
| 739 |
<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@MessageBundle</span>(projectCode = <span class="string"><span class="delimiter">"</span><span class="content">CW</span><span class="delimiter">"</span></span>) <i class="conum" data-value="1"></i><b>(1)</b> |
| 740 |
<span class="directive">public</span> <span class="type">interface</span> <span class="class">ErrorMessages</span> { |
| 741 |
ErrorMessages MESSAGES = Messages.getBundle(ErrorMessages.class); |
| 742 |
|
| 743 |
<span class="annotation">@Message</span>(<span class="string"><span class="delimiter">"</span><span class="content">Version %d.%d.%d.%s</span><span class="delimiter">"</span></span>) <i class="conum" data-value="2"></i><b>(2)</b> |
| 744 |
<span class="predefined-type">String</span> version(<span class="type">int</span> major, <span class="type">int</span> minor, <span class="type">int</span> macro, <span class="predefined-type">String</span> rel); |
| 745 |
|
| 746 |
<span class="annotation">@Message</span>(id = <span class="integer">1</span>, value = <span class="string"><span class="delimiter">"</span><span class="content">Value '%s' is invalid</span><span class="delimiter">"</span></span>) |
| 747 |
<span class="exception">IllegalArgumentException</span> invalidValue(<span class="predefined-type">Object</span> value); |
| 748 |
|
| 749 |
<span class="annotation">@Message</span>(id = <span class="integer">2</span>, value = <span class="string"><span class="delimiter">"</span><span class="content">Failure closing %s</span><span class="delimiter">"</span></span>) <i class="conum" data-value="3"></i><b>(3)</b> |
| 750 |
CloseException closeFailure(<span class="annotation">@Cause</span> <span class="predefined-type">Throwable</span> cause, <span class="annotation">@Param</span> <span class="annotation">@Pos</span>(<span class="integer">1</span>) <span class="predefined-type">Closeable</span> c); |
| 751 |
|
| 752 |
CloseException closeFailure(<span class="annotation">@Cause</span> <span class="predefined-type">Throwable</span> cause, <span class="annotation">@Param</span> <span class="annotation">@Pos</span>(<span class="integer">1</span>) <span class="predefined-type">Closeable</span> c, <span class="annotation">@Suppressed</span> <span class="predefined-type">Throwable</span>... errors); |
| 753 |
|
| 754 |
<span class="annotation">@Message</span>(id = <span class="integer">3</span>, value = <span class="string"><span class="delimiter">"</span><span class="content">Parameter %s cannot be null</span><span class="delimiter">"</span></span>) |
| 755 |
Supplier<<span class="predefined-type">String</span>> nullParam(<span class="predefined-type">String</span> name); |
| 756 |
|
| 757 |
<span class="annotation">@Message</span>(id = <span class="integer">4</span>, value = <span class="string"><span class="delimiter">"</span><span class="content">Operation %s failed.</span><span class="delimiter">"</span></span>) |
| 758 |
<T <span class="directive">extends</span> <span class="exception">RuntimeException</span>> T operationFailed(<span class="annotation">@Producer</span> Function<<span class="predefined-type">String</span>, T> fn, <span class="predefined-type">String</span> name); <i class="conum" data-value="4"></i><b>(4)</b> |
| 759 |
|
| 760 |
<T <span class="directive">extends</span> <span class="exception">RuntimeException</span>> T operationFailed(<span class="annotation">@Producer</span> BiFunction<<span class="predefined-type">String</span>, <span class="exception">IOException</span>, T> fn, <span class="annotation">@Cause</span> <span class="exception">IOException</span> cause, <span class="predefined-type">String</span> name); |
| 761 |
}</code></pre> |
| 762 |
</div> |
| 763 |
</div> |
| 764 |
<div class="colist arabic"> |
| 765 |
<table> |
| 766 |
<tr> |
| 767 |
<td><i class="conum" data-value="1"></i><b>1</b></td> |
| 768 |
<td>The <code>projectCode</code> will be prepended to messages which have an <code>id</code> specified. For example with <code>id = 1</code> the message will be prepended with <code>CW000001</code>. You can control the number padding with the <code>length</code> property on the annotation.</td> |
| 769 |
</tr> |
| 770 |
<tr> |
| 771 |
<td><i class="conum" data-value="2"></i><b>2</b></td> |
| 772 |
<td>No <code>id</code> is specified for this message which means no id will be prepended on this message.</td> |
| 773 |
</tr> |
| 774 |
<tr> |
| 775 |
<td><i class="conum" data-value="3"></i><b>3</b></td> |
| 776 |
<td>The <code>@Param</code> annotation tells the generator that the parameter should be used to construct the <code>CloseException</code>. The <code>@Pos(1)</code> annotation indicates the parameter should also be used when formatting the message.</td> |
| 777 |
</tr> |
| 778 |
<tr> |
| 779 |
<td><i class="conum" data-value="4"></i><b>4</b></td> |
| 780 |
<td>The <code>@Producer</code> annotation indicates that the <code>Function</code> should be used to create the exception being returned.</td> |
| 781 |
</tr> |
| 782 |
</table> |
| 783 |
</div> |
| 784 |
<div class="admonitionblock tip"> |
| 785 |
<table> |
| 786 |
<tr> |
| 787 |
<td class="icon"> |
| 788 |
<i class="fa icon-tip" title="Tip"></i> |
| 789 |
</td> |
| 790 |
<td class="content"> |
| 791 |
Message bundle interfaces can also contain valid <a href="#message-logger-interfaces">message logger methods</a>. |
| 792 |
</td> |
| 793 |
</tr> |
| 794 |
</table> |
| 795 |
</div> |
| 796 |
</div> |
| 797 |
</div> |
| 798 |
</div> |
| 799 |
<div class="sect1"> |
| 800 |
<h2 id="message-logger-interfaces"><a class="anchor" href="#message-logger-interfaces"></a>Message Logger Interfaces</h2> |
| 801 |
<div class="sectionbody"> |
| 802 |
<div class="paragraph"> |
| 803 |
<p>Logger interfaces provide a way to internationalize log messages. A logger interface is an interface annotated with |
| 804 |
<a href="apidocs"><code>@MessageLogger</code></a>. Each method in must be annotated with <a href="apidocs"><code>@Message</code></a> which will |
| 805 |
be used to determine the message to be logged.</p> |
| 806 |
</div> |
| 807 |
<div class="paragraph"> |
| 808 |
<p>The value for a <a href="apidocs"><code>@Message</code></a> may contain an expression.</p> |
| 809 |
</div> |
| 810 |
<div class="admonitionblock note"> |
| 811 |
<table> |
| 812 |
<tr> |
| 813 |
<td class="icon"> |
| 814 |
<i class="fa icon-note" title="Note"></i> |
| 815 |
</td> |
| 816 |
<td class="content"> |
| 817 |
Expressions are in the form of <code>${key:defaultValue}</code>. If the key is prefixed with <code>sys.</code> a system property is |
| 818 |
used. If the key is prefixed with <code>env.</code> an environment variable is used. In all other cases the properties are resolved |
| 819 |
from the <code>org.jboss.logging.tools.expressionProperties</code> path. If the key is not found in the properties the default |
| 820 |
value will be used. |
| 821 |
</td> |
| 822 |
</tr> |
| 823 |
</table> |
| 824 |
</div> |
| 825 |
<div class="admonitionblock important"> |
| 826 |
<table> |
| 827 |
<tr> |
| 828 |
<td class="icon"> |
| 829 |
<i class="fa icon-important" title="Important"></i> |
| 830 |
</td> |
| 831 |
<td class="content"> |
| 832 |
Expressions are processed at compile time. The values will be hard-coded in the generated source files. |
| 833 |
</td> |
| 834 |
</tr> |
| 835 |
</table> |
| 836 |
</div> |
| 837 |
<div class="paragraph"> |
| 838 |
<p>The following constraints are placed on methods in a message logger:</p> |
| 839 |
</div> |
| 840 |
<div class="ulist"> |
| 841 |
<ul> |
| 842 |
<li> |
| 843 |
<p>The method must have a <code>void</code> return type</p> |
| 844 |
</li> |
| 845 |
<li> |
| 846 |
<p>The method must be annotated with <a href="apidocs"><code>@LogMessage</code></a></p> |
| 847 |
</li> |
| 848 |
<li> |
| 849 |
<p>The method must be annotated with <a href="apidocs"><code>@Message</code></a> or a message must be inheritable.</p> |
| 850 |
</li> |
| 851 |
<li> |
| 852 |
<p>A method can have only one <a href="apidocs"><code>@Cause</code></a> parameter.</p> |
| 853 |
</li> |
| 854 |
</ul> |
| 855 |
</div> |
| 856 |
<div class="admonitionblock note"> |
| 857 |
<table> |
| 858 |
<tr> |
| 859 |
<td class="icon"> |
| 860 |
<i class="fa icon-note" title="Note"></i> |
| 861 |
</td> |
| 862 |
<td class="content"> |
| 863 |
A message is inheritable if the two methods have the same name and same number of format parameters. |
| 864 |
</td> |
| 865 |
</tr> |
| 866 |
</table> |
| 867 |
</div> |
| 868 |
<div class="admonitionblock note"> |
| 869 |
<table> |
| 870 |
<tr> |
| 871 |
<td class="icon"> |
| 872 |
<i class="fa icon-note" title="Note"></i> |
| 873 |
</td> |
| 874 |
<td class="content"> |
| 875 |
A format parameter is a parameter that has no annotations or is annotated with one of the following annotations; <a href="apidocs"><code>@FormatWith</code></a>, <a href="apidocs"><code>@Pos</code></a> or <a href="apidocs"><code>@Transform</code></a>. |
| 876 |
</td> |
| 877 |
</tr> |
| 878 |
</table> |
| 879 |
</div> |
| 880 |
<div class="paragraph"> |
| 881 |
<p>A message logger interface may also extend the <code>org.jboss.logging.BasicLogger</code>. This allows the logging interface to be usable for standard logging. For example <code>AppLogger.LOGGER.debugf("Initializing %s", this);</code></p> |
| 882 |
</div> |
| 883 |
<div class="sect2"> |
| 884 |
<h3 id="example-message-logger"><a class="anchor" href="#example-message-logger"></a>Example Message Logger</h3> |
| 885 |
<div class="listingblock"> |
| 886 |
<div class="content"> |
| 887 |
<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@MessageLogger</span>(projectCode = <span class="string"><span class="delimiter">"</span><span class="content">CW</span><span class="delimiter">"</span></span>) <i class="conum" data-value="1"></i><b>(1)</b> |
| 888 |
<span class="directive">public</span> <span class="type">interface</span> <span class="class">AppLogger</span> <span class="directive">extends</span> BasicLogger { |
| 889 |
|
| 890 |
AppLogger LOGGER = <span class="predefined-type">Logger</span>.getMessageLogger(AppLogger.class, AppLogger.class.getPackage().getName()); |
| 891 |
|
| 892 |
<span class="annotation">@LogMessage</span> |
| 893 |
<span class="annotation">@Once</span> <i class="conum" data-value="2"></i><b>(2)</b> |
| 894 |
<span class="annotation">@Message</span>(<span class="string"><span class="delimiter">"</span><span class="content">%s version %d.%d.%d.%s</span><span class="delimiter">"</span></span>) <i class="conum" data-value="3"></i><b>(3)</b> |
| 895 |
<span class="type">void</span> appVersion(<span class="predefined-type">CharSequence</span> name, <span class="type">int</span> major, <span class="type">int</span> minor, <span class="type">int</span> macro, <span class="predefined-type">String</span> rel); |
| 896 |
|
| 897 |
<span class="annotation">@LogMessage</span>(level = <span class="predefined-type">Logger</span>.Level.ERROR) <i class="conum" data-value="4"></i><b>(4)</b> |
| 898 |
<span class="annotation">@Message</span>(id = <span class="integer">100</span>, value = <span class="string"><span class="delimiter">"</span><span class="content">Failure while closing %s</span><span class="delimiter">"</span></span>) |
| 899 |
<span class="type">void</span> closeFailure(<span class="annotation">@Cause</span> <span class="predefined-type">Throwable</span> cause, <span class="predefined-type">Object</span> obj); |
| 900 |
|
| 901 |
<span class="annotation">@LogMessage</span>(level = <span class="predefined-type">Logger</span>.Level.WARN) |
| 902 |
<span class="annotation">@Message</span>(id = <span class="integer">101</span>, value = <span class="string"><span class="delimiter">"</span><span class="content">Encoding %s could not be found. Defaulting to %s.</span><span class="delimiter">"</span></span>) |
| 903 |
<span class="type">void</span> encodingNotFound(<span class="predefined-type">String</span> encoding, <span class="predefined-type">Charset</span> dft); |
| 904 |
|
| 905 |
<span class="annotation">@LogMessage</span> |
| 906 |
<span class="annotation">@Message</span>(id = <span class="integer">102</span>, value = <span class="string"><span class="delimiter">"</span><span class="content">Cache size changed to '%d'</span><span class="delimiter">"</span></span>) |
| 907 |
<span class="type">void</span> cacheSizeChanged(<span class="annotation">@Transform</span>(Transform.TransformType.SIZE) <span class="predefined-type">Collection</span><<span class="predefined-type">String</span>> c); |
| 908 |
|
| 909 |
<span class="annotation">@LogMessage</span> |
| 910 |
<span class="type">void</span> cacheSizeChanged(<span class="annotation">@Transform</span>(Transform.TransformType.SIZE) <span class="predefined-type">String</span>... array); |
| 911 |
|
| 912 |
<span class="annotation">@LogMessage</span> |
| 913 |
<span class="type">void</span> cacheSizeChanged(<span class="annotation">@Transform</span>(Transform.TransformType.SIZE) <span class="predefined-type">Map</span><<span class="predefined-type">String</span>, <span class="predefined-type">Object</span>> map); |
| 914 |
}</code></pre> |
| 915 |
</div> |
| 916 |
</div> |
| 917 |
<div class="colist arabic"> |
| 918 |
<table> |
| 919 |
<tr> |
| 920 |
<td><i class="conum" data-value="1"></i><b>1</b></td> |
| 921 |
<td>The <code>projectCode</code> will be prepended to messages which have an <code>id</code> specified. For example with <code>id = 100</code> the message will be prepended with <code>CW000100</code>. You can control the number padding with the <code>length</code> property on the annotation.</td> |
| 922 |
</tr> |
| 923 |
<tr> |
| 924 |
<td><i class="conum" data-value="2"></i><b>2</b></td> |
| 925 |
<td>Ensures the log message is only written once.</td> |
| 926 |
</tr> |
| 927 |
<tr> |
| 928 |
<td><i class="conum" data-value="3"></i><b>3</b></td> |
| 929 |
<td>No <code>id</code> is specified for this message which means no id will be prepended on this message.</td> |
| 930 |
</tr> |
| 931 |
<tr> |
| 932 |
<td><i class="conum" data-value="4"></i><b>4</b></td> |
| 933 |
<td>Overrides the default level to <code>ERROR</code> to indicate an error message should be logged.</td> |
| 934 |
</tr> |
| 935 |
</table> |
| 936 |
</div> |
| 937 |
</div> |
| 938 |
</div> |
| 939 |
</div> |
| 940 |
<div class="sect1"> |
| 941 |
<h2 id="reports"><a class="anchor" href="#reports"></a>Reports</h2> |
| 942 |
<div class="sectionbody"> |
| 943 |
<div class="paragraph"> |
| 944 |
<p>There are currently two types of reports that can be generated. The options are <code>adoc</code> or <code>asciidoc</code> for asciidoc and <code>xml</code> for XML.</p> |
| 945 |
</div> |
| 946 |
<div class="paragraph"> |
| 947 |
<p>The reports contain the following data:</p> |
| 948 |
</div> |
| 949 |
<div class="ulist"> |
| 950 |
<ul> |
| 951 |
<li> |
| 952 |
<p>The formatted message id.</p> |
| 953 |
</li> |
| 954 |
<li> |
| 955 |
<p>A possible link to a resolution document for the error.</p> |
| 956 |
</li> |
| 957 |
<li> |
| 958 |
<p>The unformatted message.</p> |
| 959 |
</li> |
| 960 |
<li> |
| 961 |
<p>The log level, if applicable.</p> |
| 962 |
</li> |
| 963 |
<li> |
| 964 |
<p>The return type, if applicable.</p> |
| 965 |
</li> |
| 966 |
</ul> |
| 967 |
</div> |
| 968 |
<div class="sect2"> |
| 969 |
<h3 id="annotations"><a class="anchor" href="#annotations"></a>Annotations</h3> |
| 970 |
<div class="paragraph"> |
| 971 |
<p>Two annotations can be used to assist withing linking resolution documents for messages.</p> |
| 972 |
</div> |
| 973 |
<div class="ulist"> |
| 974 |
<ul> |
| 975 |
<li> |
| 976 |
<p><a href="apidocs"><code>@BaseUrl</code></a></p> |
| 977 |
<div class="ulist"> |
| 978 |
<ul> |
| 979 |
<li> |
| 980 |
<p>This annotation can be used on a type to define the base URL for linking resolution documents. This annotation is |
| 981 |
not required for links to be created on reports.</p> |
| 982 |
</li> |
| 983 |
</ul> |
| 984 |
</div> |
| 985 |
</li> |
| 986 |
<li> |
| 987 |
<p><a href="apidocs"><code>@ResolutionDoc</code></a></p> |
| 988 |
<div class="ulist"> |
| 989 |
<ul> |
| 990 |
<li> |
| 991 |
<p>This annotation is used to define information about the resolution document for creating links. If placed on an |
| 992 |
interface all methods that have a defined id will have a link generated. This can also be placed individually on |
| 993 |
the method to only generate links for specific id’s.</p> |
| 994 |
</li> |
| 995 |
</ul> |
| 996 |
</div> |
| 997 |
</li> |
| 998 |
</ul> |
| 999 |
</div> |
| 1000 |
</div> |
| 1001 |
</div> |
| 1002 |
</div> |
| 1003 |
<div class="sect1"> |
| 1004 |
<h2 id="example-use-cases"><a class="anchor" href="#example-use-cases"></a>Example Use Cases</h2> |
| 1005 |
<div class="sectionbody"> |
| 1006 |
<div class="paragraph"> |
| 1007 |
<p>Below are some example use case snippets from the <a href="https://github.com/jboss-logging/jboss-logging-tools/docs/src/main/java/org/jboss/logging/tools/examples">examples</a>.</p> |
| 1008 |
</div> |
| 1009 |
<div class="listingblock"> |
| 1010 |
<div class="content"> |
| 1011 |
<pre class="CodeRay highlight"><code data-lang="java"><span class="comment">/** |
| 1012 |
* Writes the value of the object to the file. |
| 1013 |
* |
| 1014 |
* @param value the value to write, cannot be {@code null} |
| 1015 |
* |
| 1016 |
* @throws UncheckedIOException if an error occurs writing the data |
| 1017 |
*/</span> |
| 1018 |
<span class="directive">public</span> <span class="type">void</span> write(<span class="directive">final</span> <span class="predefined-type">Object</span> value) { |
| 1019 |
AppLogger.LOGGER.appVersion(<span class="string"><span class="delimiter">"</span><span class="content">ContentWriter</span><span class="delimiter">"</span></span>, <span class="integer">1</span>, <span class="integer">0</span>, <span class="integer">0</span>, <span class="string"><span class="delimiter">"</span><span class="content">Beta1</span><span class="delimiter">"</span></span>); <i class="conum" data-value="1"></i><b>(1)</b> |
| 1020 |
Objects.requireNonNull(value, ErrorMessages.MESSAGES.nullParam(<span class="string"><span class="delimiter">"</span><span class="content">value</span><span class="delimiter">"</span></span>)); <i class="conum" data-value="2"></i><b>(2)</b> |
| 1021 |
write(Objects.requireNonNull(value, ErrorMessages.MESSAGES.nullParam(<span class="string"><span class="delimiter">"</span><span class="content">value</span><span class="delimiter">"</span></span>)).toString()); |
| 1022 |
} |
| 1023 |
|
| 1024 |
<span class="comment">/** |
| 1025 |
* Writes the value to the file. |
| 1026 |
* |
| 1027 |
* @param value the value to write, cannot be {@code null} or an {@linkplain String#isEmpty() empty string}. |
| 1028 |
* |
| 1029 |
* @throws UncheckedIOException if an error occurs writing the data |
| 1030 |
*/</span> |
| 1031 |
<span class="directive">public</span> <span class="type">void</span> write(<span class="directive">final</span> <span class="predefined-type">String</span> value) { |
| 1032 |
AppLogger.LOGGER.appVersion(<span class="string"><span class="delimiter">"</span><span class="content">ContentWriter</span><span class="delimiter">"</span></span>, <span class="integer">1</span>, <span class="integer">0</span>, <span class="integer">0</span>, <span class="string"><span class="delimiter">"</span><span class="content">Beta1</span><span class="delimiter">"</span></span>); |
| 1033 |
<span class="keyword">if</span> (Objects.requireNonNull(value, ErrorMessages.MESSAGES.nullParam(<span class="string"><span class="delimiter">"</span><span class="content">value</span><span class="delimiter">"</span></span>)).isEmpty()) { |
| 1034 |
<span class="keyword">throw</span> ErrorMessages.MESSAGES.invalidValue(value); <i class="conum" data-value="3"></i><b>(3)</b> |
| 1035 |
} |
| 1036 |
<span class="keyword">try</span> { |
| 1037 |
<span class="directive">synchronized</span> (outputLock) { |
| 1038 |
writer.write(value); |
| 1039 |
writer.newLine(); |
| 1040 |
<span class="keyword">if</span> (autoFlush) { |
| 1041 |
flush(); |
| 1042 |
} |
| 1043 |
} |
| 1044 |
} <span class="keyword">catch</span> (<span class="exception">IOException</span> e) { |
| 1045 |
<span class="keyword">throw</span> ErrorMessages.MESSAGES.operationFailed(UncheckedIOException::<span class="keyword">new</span>, e, <span class="string"><span class="delimiter">"</span><span class="content">write</span><span class="delimiter">"</span></span>); <i class="conum" data-value="4"></i><b>(4)</b> |
| 1046 |
} |
| 1047 |
} |
| 1048 |
|
| 1049 |
<span class="annotation">@Override</span> |
| 1050 |
<span class="directive">public</span> <span class="type">void</span> close() { |
| 1051 |
<span class="keyword">try</span> { |
| 1052 |
<span class="directive">synchronized</span> (outputLock) { |
| 1053 |
writer.close(); |
| 1054 |
} |
| 1055 |
AppLogger.LOGGER.tracef(<span class="string"><span class="delimiter">"</span><span class="content">ContentWriter %s was successfully closed.</span><span class="delimiter">"</span></span>, <span class="local-variable">this</span>); |
| 1056 |
} <span class="keyword">catch</span> (<span class="exception">Exception</span> e) { |
| 1057 |
<span class="keyword">throw</span> ErrorMessages.MESSAGES.closeFailure(e, <span class="local-variable">this</span>); |
| 1058 |
} |
| 1059 |
} |
| 1060 |
|
| 1061 |
<span class="comment">/** |
| 1062 |
* Safely close this writer logging any errors that occur during closing. |
| 1063 |
*/</span> |
| 1064 |
<span class="directive">public</span> <span class="type">void</span> safeClose() { |
| 1065 |
<span class="keyword">try</span> { |
| 1066 |
<span class="directive">synchronized</span> (outputLock) { |
| 1067 |
writer.close(); |
| 1068 |
} |
| 1069 |
AppLogger.LOGGER.tracef(<span class="string"><span class="delimiter">"</span><span class="content">ContentWriter %s was successfully closed.</span><span class="delimiter">"</span></span>, <span class="local-variable">this</span>); |
| 1070 |
} <span class="keyword">catch</span> (<span class="exception">Exception</span> e) { |
| 1071 |
AppLogger.LOGGER.closeFailure(e, <span class="local-variable">this</span>); <i class="conum" data-value="5"></i><b>(5)</b> |
| 1072 |
} |
| 1073 |
}</code></pre> |
| 1074 |
</div> |
| 1075 |
</div> |
| 1076 |
<div class="colist arabic"> |
| 1077 |
<table> |
| 1078 |
<tr> |
| 1079 |
<td><i class="conum" data-value="1"></i><b>1</b></td> |
| 1080 |
<td>Logs the application version. Note this uses the <a href="apidocs">@Once</a> annotation to indicate this should only be logged once regardless of which <code>write</code> method is used.</td> |
| 1081 |
</tr> |
| 1082 |
<tr> |
| 1083 |
<td><i class="conum" data-value="2"></i><b>2</b></td> |
| 1084 |
<td>The <code>ErrorMessages.nullParam()</code> returns a <code>java.lang.function.Supplier</code>. This allows the message to be lazily formatted only if the <code>value</code> is <code>null</code>.</td> |
| 1085 |
</tr> |
| 1086 |
<tr> |
| 1087 |
<td><i class="conum" data-value="3"></i><b>3</b></td> |
| 1088 |
<td>Throws a message if the <code>value</code> is an empty string.</td> |
| 1089 |
</tr> |
| 1090 |
<tr> |
| 1091 |
<td><i class="conum" data-value="4"></i><b>4</b></td> |
| 1092 |
<td>Uses a <code>java.lang.function.BiFunction</code> to create a new <code>UncheckedIOException</code> with the caught exception set as the cause.</td> |
| 1093 |
</tr> |
| 1094 |
<tr> |
| 1095 |
<td><i class="conum" data-value="5"></i><b>5</b></td> |
| 1096 |
<td>Logs the caught exception instead of throwing a new exception.</td> |
| 1097 |
</tr> |
| 1098 |
</table> |
| 1099 |
</div> |
| 1100 |
</div> |
| 1101 |
</div> |
| 1102 |
<div class="sect1"> |
| 1103 |
<h2 id="translation-property-files"><a class="anchor" href="#translation-property-files"></a>Translation Property Files</h2> |
| 1104 |
<div class="sectionbody"> |
| 1105 |
<div class="paragraph"> |
| 1106 |
<p>The translation properties files must exist in the same directory structure as the interface. The name of the properties file <code>InterfaceName.i18n_language_country_variant.properties</code>. For example if you have a class named <code>org.jboss.logging.tools.examples.ErrorMessages</code> and you want to translate this into French you create a properties file called <code>ErrorMessages.i18n_fr.properties</code> in a directory <code>org/jboss/logging/tools/examples</code>.</p> |
| 1107 |
</div> |
| 1108 |
</div> |
| 1109 |
</div> |
| 1110 |
<div class="sect1"> |
| 1111 |
<h2 id="annotation-processor-options"><a class="anchor" href="#annotation-processor-options"></a>Annotation Processor Options</h2> |
| 1112 |
<div class="sectionbody"> |
| 1113 |
<div class="paragraph"> |
| 1114 |
<p>You can pass options to an annotation processor with the <code>-A</code> compiler option. For example to disable generating the <code>@Generated</code> annotation from being placed on the generated source files you would pass <code>-Aorg.jboss.logging.tools.addGeneratedAnnotation=false</code> to the compiler command.</p> |
| 1115 |
</div> |
| 1116 |
<div class="sect2"> |
| 1117 |
<h3 id="general"><a class="anchor" href="#general"></a>General</h3> |
| 1118 |
<table class="tableblock frame-none grid-none stretch"> |
| 1119 |
<colgroup> |
| 1120 |
<col style="width: 50%;"> |
| 1121 |
<col style="width: 50%;"> |
| 1122 |
</colgroup> |
| 1123 |
<thead> |
| 1124 |
<tr> |
| 1125 |
<th class="tableblock halign-left valign-top">Option</th> |
| 1126 |
<th class="tableblock halign-left valign-top">Description</th> |
| 1127 |
</tr> |
| 1128 |
</thead> |
| 1129 |
<tbody> |
| 1130 |
<tr> |
| 1131 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>debug</code></p></td> |
| 1132 |
<td class="tableblock halign-left valign-top"><p class="tableblock">This option turns on debug logging for the processor</p></td> |
| 1133 |
</tr> |
| 1134 |
<tr> |
| 1135 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.jboss.logging.tools.expressionProperties</code></p></td> |
| 1136 |
<td class="tableblock halign-left valign-top"><p class="tableblock">This option allows you to define a path where, at compile-time, expressions in messages can be resolved.</p></td> |
| 1137 |
</tr> |
| 1138 |
<tr> |
| 1139 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.jboss.logging.tools.addGeneratedAnnotation</code></p></td> |
| 1140 |
<td class="tableblock halign-left valign-top"><p class="tableblock">If set to <code>false</code> the <code>@Generated</code> annotation will not be placed on the generated source files. The default is <code>true</code>.</p></td> |
| 1141 |
</tr> |
| 1142 |
</tbody> |
| 1143 |
</table> |
| 1144 |
<div class="admonitionblock note"> |
| 1145 |
<table> |
| 1146 |
<tr> |
| 1147 |
<td class="icon"> |
| 1148 |
<i class="fa icon-note" title="Note"></i> |
| 1149 |
</td> |
| 1150 |
<td class="content"> |
| 1151 |
In Java 9 the <code>@javax.annotation.Generated</code> was moved to <code>@javax.annotation.processor.Generated</code>. The processor attempts to determine which annotation to use by attempting to find the <code>@javax.annotation.Generated</code> first. If it fails the <code>@javax.annotation.processor.Generated</code> is attempted. If neither can be found no annotation will be placed on the generated implementations. |
| 1152 |
</td> |
| 1153 |
</tr> |
| 1154 |
</table> |
| 1155 |
</div> |
| 1156 |
<div class="admonitionblock note"> |
| 1157 |
<table> |
| 1158 |
<tr> |
| 1159 |
<td class="icon"> |
| 1160 |
<i class="fa icon-note" title="Note"></i> |
| 1161 |
</td> |
| 1162 |
<td class="content"> |
| 1163 |
Expressions are in the form of <code>${key:defaultValue}</code>. If the key is prefixed with <code>sys.</code> a system property is |
| 1164 |
used. If the key is prefixed with <code>env.</code> an environment variable is used. In all other cases the properties are resolved |
| 1165 |
from the <code>org.jboss.logging.tools.expressionProperties</code> path. If the key is not found in the properties the default |
| 1166 |
value will be used. |
| 1167 |
</td> |
| 1168 |
</tr> |
| 1169 |
</table> |
| 1170 |
</div> |
| 1171 |
<div class="admonitionblock important"> |
| 1172 |
<table> |
| 1173 |
<tr> |
| 1174 |
<td class="icon"> |
| 1175 |
<i class="fa icon-important" title="Important"></i> |
| 1176 |
</td> |
| 1177 |
<td class="content"> |
| 1178 |
Expressions are processed at compile time. The values will be hard-coded in the generated source files. |
| 1179 |
</td> |
| 1180 |
</tr> |
| 1181 |
</table> |
| 1182 |
</div> |
| 1183 |
</div> |
| 1184 |
<div class="sect2"> |
| 1185 |
<h3 id="translation-options"><a class="anchor" href="#translation-options"></a>Translation Options</h3> |
| 1186 |
<table class="tableblock frame-none grid-none stretch"> |
| 1187 |
<colgroup> |
| 1188 |
<col style="width: 50%;"> |
| 1189 |
<col style="width: 50%;"> |
| 1190 |
</colgroup> |
| 1191 |
<thead> |
| 1192 |
<tr> |
| 1193 |
<th class="tableblock halign-left valign-top">Option</th> |
| 1194 |
<th class="tableblock halign-left valign-top">Description</th> |
| 1195 |
</tr> |
| 1196 |
</thead> |
| 1197 |
<tbody> |
| 1198 |
<tr> |
| 1199 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>translationsFilesPath</code></p></td> |
| 1200 |
<td class="tableblock halign-left valign-top"><p class="tableblock">The base path for the translated properties files. This defaults to the location where new class files are placed.</p></td> |
| 1201 |
</tr> |
| 1202 |
<tr> |
| 1203 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>skipTranslations</code></p></td> |
| 1204 |
<td class="tableblock halign-left valign-top"><p class="tableblock">If set to <code>true</code> source files with the translated tet will not be generated. The default is <code>false</code>.</p></td> |
| 1205 |
</tr> |
| 1206 |
<tr> |
| 1207 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>generatedTranslationFilesPath</code></p></td> |
| 1208 |
<td class="tableblock halign-left valign-top"><p class="tableblock">If defined this indicates the path a skeleton file should be generated for the interface. The generated skeleton file will be placed in a directory that matches the package with a name that matches the interface with a <code>.i18n_locale_COUNTRY_VARIANT.properties</code> suffix.</p></td> |
| 1209 |
</tr> |
| 1210 |
<tr> |
| 1211 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.jboss.logging.tools.level</code></p></td> |
| 1212 |
<td class="tableblock halign-left valign-top"><p class="tableblock">Sets the maximum level to include in the generated skeleton files. For example if set to <code>INFO</code> the skeleton files will not contain any properties where the log level was set to <code>DEBUG</code> or <code>TRACE</code>.</p></td> |
| 1213 |
</tr> |
| 1214 |
<tr> |
| 1215 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.jboss.logging.tools.generated.skip.index</code></p></td> |
| 1216 |
<td class="tableblock halign-left valign-top"><p class="tableblock">By default when generating a skeleton translation file an index will be appended to the format pattern. For example <code>Example %s and %d</code> becomes <code>Example %1$s and %2$d</code>. This option allows this behavior to be disabled.</p></td> |
| 1217 |
</tr> |
| 1218 |
</tbody> |
| 1219 |
</table> |
| 1220 |
</div> |
| 1221 |
<div class="sect2"> |
| 1222 |
<h3 id="report-options"><a class="anchor" href="#report-options"></a>Report Options</h3> |
| 1223 |
<table class="tableblock frame-none grid-none stretch"> |
| 1224 |
<colgroup> |
| 1225 |
<col style="width: 50%;"> |
| 1226 |
<col style="width: 50%;"> |
| 1227 |
</colgroup> |
| 1228 |
<thead> |
| 1229 |
<tr> |
| 1230 |
<th class="tableblock halign-left valign-top">Option</th> |
| 1231 |
<th class="tableblock halign-left valign-top">Description</th> |
| 1232 |
</tr> |
| 1233 |
</thead> |
| 1234 |
<tbody> |
| 1235 |
<tr> |
| 1236 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.jboss.logging.tools.report.type</code></p></td> |
| 1237 |
<td class="tableblock halign-left valign-top"><p class="tableblock">Indicates the type of report that should be generated. The current report types are <code>adoc</code> for asciidoc or <code>xml</code> for XML.</p></td> |
| 1238 |
</tr> |
| 1239 |
<tr> |
| 1240 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.jboss.logging.tools.report.path</code></p></td> |
| 1241 |
<td class="tableblock halign-left valign-top"><p class="tableblock">The path where the generated reports should be placed. This defaults to the location where new class files are placed.</p></td> |
| 1242 |
</tr> |
| 1243 |
<tr> |
| 1244 |
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>org.jboss.logging.tools.report.title</code></p></td> |
| 1245 |
<td class="tableblock halign-left valign-top"><p class="tableblock">An optional title for the report. For asciidoc this defaults to <code>Messages</code>. For XML the <code><title></code> element is left off.</p></td> |
| 1246 |
</tr> |
| 1247 |
</tbody> |
| 1248 |
</table> |
| 1249 |
</div> |
| 1250 |
</div> |
| 1251 |
</div> |
| 1252 |
</div> |
| 1253 |
<script src="js/links.js"></script> |
| 1254 |
<script> |
| 1255 |
window.onload=annotationLinks; |
| 1256 |
</script> |
| 1257 |
</body> |
| 1258 |
</html> |