[{"data":1,"prerenderedAt":628},["ShallowReactive",2],{"docs-page-\u002Fdocs\u002Fpapertrail":3,"docs-surround-\u002Fdocs\u002Fpapertrail":624},{"id":4,"title":5,"body":6,"description":616,"extension":617,"meta":618,"navigation":619,"path":620,"seo":621,"stem":622,"__hash__":623},"docs\u002Fdocs\u002F13.papertrail.md","Moving from Papertrail",{"type":7,"value":8,"toc":604},"minimark",[9,13,17,26,31,59,63,66,168,173,176,311,317,320,324,481,485,488,521,525,528,567,575,579,582,600],[10,11,5],"h1",{"id":12},"moving-from-papertrail",[14,15,16],"p",{},"Papertrail collects lines of text over syslog from whatever sends them: your servers' syslog daemons, log files it tails, containers, Heroku and your loggers. Lumber takes logs another way. A client inside your own code encrypts each log before it's sent, so Lumber's servers never read it. Moving is adding a client to each app, rather than pointing a sender at a new address.",[14,18,19,20,25],{},"This page covers what replaces each way of sending logs to Papertrail, how Papertrail's ideas map to Lumber's, what has no match, and how to run both while you switch. ",[21,22,24],"a",{"href":23},"\u002Fcompare","Lumber vs Papertrail and Better Stack"," has the two side by side.",[27,28,30],"h2",{"id":29},"before-you-start","Before you start",[32,33,34,48,51],"ul",{},[35,36,37,38,42,43,47],"li",{},"Lumber is for your own apps' logs. Its clients for Node.js, Python, Go, Java, Kotlin, C# and PHP run in the processes you run (servers, workers, scheduled jobs), and any other language can send over the ",[21,39,41],{"href":40},"\u002Fdocs\u002Fhttp-api","HTTP API",", encrypting each log itself. Never put an API key in an app or game you ship to people (",[21,44,46],{"href":45},"\u002Fdocs\u002Fapi-keys#keep-the-key-on-your-servers","why",").",[35,49,50],{},"Lumber doesn't take syslog, tail files or receive log drains, so system logs and logs from software you don't write (a database, a web server, network hardware) stay with whatever collects them today.",[35,52,53,54,58],{},"You'll need a Lumber account and an app with an API key, which ",[21,55,57],{"href":56},"\u002Fdocs\u002Fgetting-started","Getting Started"," covers in a few minutes.",[27,60,62],{"id":61},"sending-logs","Sending logs",[14,64,65],{},"Each way of sending logs to Papertrail, and what takes its place:",[67,68,69,82],"table",{},[70,71,72],"thead",{},[73,74,75,79],"tr",{},[76,77,78],"th",{},"To Papertrail",[76,80,81],{},"In Lumber",[83,84,85,115,129,141,155],"tbody",{},[73,86,87,107],{},[88,89,90,91,95,96,99,100,103,104],"td",{},"A logger's syslog handler or transport: Python's ",[92,93,94],"code",{},"SysLogHandler",", Logback's syslog appenders, NLog's syslog target, ",[92,97,98],{},"winston-syslog",", Monolog's ",[92,101,102],{},"SyslogUdpHandler",", Go's ",[92,105,106],{},"log\u002Fsyslog",[88,108,109,110,114],{},"Lumber's handler for the same logger, where there is one (",[21,111,113],{"href":112},"#your-logger","below","), or the client's own log methods",[73,116,117,126],{},[88,118,119,125],{},[21,120,124],{"href":121,"rel":122},"https:\u002F\u002Fwww.papertrail.com\u002Fhelp\u002Fconfiguring-centralized-logging-from-text-log-files-in-unix\u002F",[123],"nofollow","remote_syslog2",", tailing your app's log files",[88,127,128],{},"A client in the app that writes the files. Lumber doesn't read files",[73,130,131,138],{},[88,132,133],{},[21,134,137],{"href":135,"rel":136},"https:\u002F\u002Fwww.papertrail.com\u002Fhelp\u002Fconfiguring-centralized-logging-from-docker\u002F",[123],"logspout, or Docker's syslog logging driver",[88,139,140],{},"A client in the app inside each container. Lumber doesn't read containers' output",[73,142,143,152],{},[88,144,145,146,151],{},"A ",[21,147,150],{"href":148,"rel":149},"https:\u002F\u002Fwww.papertrail.com\u002Fhelp\u002Fheroku\u002F",[123],"Heroku log drain",", or the Papertrail add-on",[88,153,154],{},"A client in your app, which runs on its dynos as on any server. Heroku's router and platform logs don't come with it",[73,156,157,165],{},[88,158,159,164],{},[21,160,163],{"href":161,"rel":162},"https:\u002F\u002Fwww.papertrail.com\u002Fhelp\u002Fconfiguring-remote-syslog-from-unixlinux-and-bsdos-x\u002F",[123],"rsyslog, syslog-ng or syslogd",", forwarding system logs",[88,166,167],{},"Nothing: keep these where they are",[169,170,172],"h3",{"id":171},"your-logger","Your logger",[14,174,175],{},"Most clients plug into a logger you already use, so what your code and its libraries log goes to Lumber with a package and a few lines of setup:",[67,177,178,190],{},[70,179,180],{},[73,181,182,185,188],{},[76,183,184],{},"Language",[76,186,187],{},"Logger",[76,189,81],{},[83,191,192,211,229,246,270,295],{},[73,193,194,197,203],{},[88,195,196],{},"Python",[88,198,199,202],{},[92,200,201],{},"logging",", Django included",[88,204,205],{},[21,206,208],{"href":207},"\u002Fdocs\u002Fpython#with-logging",[92,209,210],{},"LumberHandler",[73,212,213,216,221],{},[88,214,215],{},"Go",[88,217,218],{},[92,219,220],{},"log\u002Fslog",[88,222,223],{},[21,224,226],{"href":225},"\u002Fdocs\u002Fgo#with-logslog",[92,227,228],{},"client.Handler",[73,230,231,234,237],{},[88,232,233],{},"Java and Kotlin",[88,235,236],{},"SLF4J and Logback, Spring Boot included",[88,238,239],{},[21,240,242,245],{"href":241},"\u002Fdocs\u002Fjava#slf4j-logback-and-spring-boot",[92,243,244],{},"lumber-logback","'s appender",[73,247,248,251,257],{},[88,249,250],{},"C# and .NET",[88,252,253,256],{},[92,254,255],{},"ILogger"," (ASP.NET Core, worker services, Azure Functions), Serilog",[88,258,259,265,266],{},[21,260,262],{"href":261},"\u002Fdocs\u002Fdotnet#aspnet-core-and-ilogger",[92,263,264],{},"AddLumber()",", the ",[21,267,269],{"href":268},"\u002Fdocs\u002Fdotnet#serilog","Serilog sink",[73,271,272,275,278],{},[88,273,274],{},"PHP",[88,276,277],{},"PSR-3, Monolog and Symfony, Laravel",[88,279,280,281,285,286,290,291],{},"The ",[21,282,284],{"href":283},"\u002Fdocs\u002Fphp","client",", a PSR-3 logger itself; a ",[21,287,289],{"href":288},"\u002Fdocs\u002Fphp#monolog-and-symfony","Monolog handler","; a ",[21,292,294],{"href":293},"\u002Fdocs\u002Fphp#laravel","log channel",[73,296,297,300,303],{},[88,298,299],{},"Node.js",[88,301,302],{},"winston, pino, bunyan",[88,304,305,306,310],{},"No transport: call ",[21,307,309],{"href":308},"\u002Fdocs\u002Fnode#log-methods","Lumber's own log methods"," beside your logger",[14,312,313,314,316],{},"NLog and log4net have no Lumber target either: in .NET, log through ",[92,315,255],{}," or Serilog, or call the client.",[14,318,319],{},"Syslog carries one line at a time, which is why Papertrail's guides split a traceback into lines. A Lumber log carries structured data beside its message, so an exception's trace travels with the log it belongs to: the Python, Java and PHP clients send it in the log's metadata.",[27,321,323],{"id":322},"papertrails-ideas-in-lumber","Papertrail's ideas in Lumber",[67,325,326,336],{},[70,327,328],{},[73,329,330,333],{},[76,331,332],{},"Papertrail",[76,334,335],{},"Lumber",[83,337,338,351,368,382,394,411,426,443,468],{},[73,339,340,348],{},[88,341,342,347],{},[21,343,346],{"href":344,"rel":345},"https:\u002F\u002Fwww.papertrail.com\u002Fhelp\u002Fadding-and-removing-senders\u002F",[123],"Systems",", each named by its hostname",[88,349,350],{},"Every client sends the process id and hostname in each log's context, encrypted, unless you turn it off, so you can tell machines apart and search for one. Lumber keeps no list of machines",[73,352,353,361],{},[88,354,355,360],{},[21,356,359],{"href":357,"rel":358},"https:\u002F\u002Fwww.papertrail.com\u002Fhelp\u002Fgroups\u002F",[123],"Groups"," of systems",[88,362,363,364,367],{},"Apps. Make an app for each service. Each client can send an environment as ",[92,365,366],{},"env"," in the context, or give each environment an app of its own",[73,369,370,373],{},[88,371,372],{},"Search, on Papertrail's servers",[88,374,375,376],{},"Lumber's servers filter by app, level and time. Text search runs on your device, in the Lumber app or with ",[21,377,379],{"href":378},"\u002Fdocs\u002Fcli#finding-logs",[92,380,381],{},"lumber logs -g",[73,383,384,387],{},[88,385,386],{},"Saved searches",[88,388,389,390,393],{},"None. A ",[92,391,392],{},"lumber logs"," command with its filters, kept in a script, comes closest",[73,395,396,404],{},[88,397,398,403],{},[21,399,402],{"href":400,"rel":401},"https:\u002F\u002Fwww.papertrail.com\u002Fhelp\u002Falerts\u002F",[123],"Alerts"," on a saved search, to email, Slack, PagerDuty or a webhook",[88,405,406,407],{},"Push alerts on your iPhone or iPad when an app logs at or above the level you set in its settings, down to your plan's lowest: Fatal on Hobby, Error on Dev, Warn on Pro, Debug on Enterprise. None on text, and none to other services. An AI agent can also ",[21,408,410],{"href":409},"\u002Fdocs\u002Fmcp#watching-for-errors","watch for errors",[73,412,413,416],{},[88,414,415],{},"Live tail",[88,417,418,419,425],{},"The Lumber app and ",[21,420,422],{"href":421},"\u002Fdocs\u002Fcli#following-logs",[92,423,424],{},"lumber tail"," follow new logs as they arrive, live on Dev and up",[73,427,428,436],{},[88,429,430,435],{},[21,431,434],{"href":432,"rel":433},"https:\u002F\u002Fwww.papertrail.com\u002Fhelp\u002Fpermanent-log-archives\u002F",[123],"Archives",", hourly files on S3",[88,437,438,439,442],{},"Retention: each plan keeps logs a set number of days (7 on Hobby, 30 on Dev, 90 on Pro, unlimited on Enterprise), then deletes them. To keep a copy, ",[92,440,441],{},"lumber logs --json"," prints logs decrypted, to save where you like",[73,444,445,453],{},[88,446,280,447,452],{},[21,448,451],{"href":449,"rel":450},"https:\u002F\u002Fwww.papertrail.com\u002Fhelp\u002Fsearch-api\u002F",[123],"search API"," and command-line client",[88,454,280,455,459,460,463,464],{},[21,456,458],{"href":457},"\u002Fdocs\u002Fcli","lumber command",", and ",[92,461,462],{},"lumber mcp"," for ",[21,465,467],{"href":466},"\u002Fdocs\u002Fmcp","AI agents",[73,469,470,473],{},[88,471,472],{},"Priced by data volume, per GB",[88,474,475,476,480],{},"Priced by the number of logs across your team's apps, each up to 16 KB once encrypted. Errors always get through: past your plan's monthly logs, Lumber still takes error and fatal logs, up to twice the number (",[21,477,479],{"href":478},"\u002Fdocs\u002Fhttp-api#monthly-logs","how",")",[27,482,484],{"id":483},"what-has-no-match","What has no match",[14,486,487],{},"A service that can't read your logs gives up some of what Papertrail does with them:",[32,489,490,497,503,509,515],{},[35,491,492,496],{},[493,494,495],"strong",{},"Syslog, file tailing and log drains."," Every log is encrypted before it's sent, so there's nowhere to point a syslog daemon, remote_syslog2, logspout or a drain.",[35,498,499,502],{},[493,500,501],{},"System logs and software you didn't write."," Logs from the operating system, a database or a web server have nowhere to add a client, so keep sending those to Papertrail or another collector.",[35,504,505,508],{},[493,506,507],{},"Alerts on text, and saved searches."," Push alerts follow a log's level, the one part of it Lumber's servers can read, and go only to the Lumber app.",[35,510,511,514],{},[493,512,513],{},"Search on the server."," Text search reads back through your logs on your device, up to 20,000 at a time in the lumber command: enough to find what broke, not to analyze months of logs.",[35,516,517,520],{},[493,518,519],{},"Archives."," Logs older than your plan keeps are deleted, with no copy to S3.",[27,522,524],{"id":523},"choosing-a-plan","Choosing a plan",[14,526,527],{},"Papertrail prices by data volume and Lumber by the number of logs, so count logs rather than gigabytes. A Papertrail archive holds one log per line, so a month of downloaded archives gives the count:",[529,530,535],"pre",{"className":531,"code":532,"language":533,"meta":534,"style":534},"language-bash shiki shiki-themes github-dark","gzip -dc *.tsv.gz | wc -l\n","bash","",[92,536,537],{"__ignoreMap":534},[538,539,542,546,550,553,557,561,564],"span",{"class":540,"line":541},"line",1,[538,543,545],{"class":544},"svObZ","gzip",[538,547,549],{"class":548},"sDLfK"," -dc",[538,551,552],{"class":548}," *",[538,554,556],{"class":555},"sU2Wk",".tsv.gz",[538,558,560],{"class":559},"snl16"," |",[538,562,563],{"class":544}," wc",[538,565,566],{"class":548}," -l\n",[14,568,569,570,574],{},"Leave out the systems whose logs stay behind, such as syslog daemons. ",[21,571,573],{"href":572},"\u002F#pricing","Pricing"," has each plan's monthly logs.",[27,576,578],{"id":577},"running-both-while-you-switch","Running both while you switch",[14,580,581],{},"Papertrail can keep running while you move one service at a time:",[583,584,585,588,591,594,597],"ol",{},[35,586,587],{},"Create a Lumber app for the service and add its client, hooked into the logger the service already uses. Most loggers take more than one handler, appender or sink, so the same logs go to both. In Node.js, call Lumber beside your logger.",[35,589,590],{},"Set the app's push alerts in the Lumber app. Keep any Papertrail alert that matches text: Lumber has nothing to replace it.",[35,592,593],{},"Watch both for a few days: the same errors should show up in each, and the Lumber app shows your team's owner and admins how many logs it has sent this month.",[35,595,596],{},"Move the next service, and take Papertrail's handler out of each one once it's in Lumber.",[35,598,599],{},"Before you close your Papertrail account, download any archives you want to keep. Keep Papertrail, or another collector, for system logs if you still need them.",[601,602,603],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":534,"searchDepth":605,"depth":605,"links":606},2,[607,608,612,613,614,615],{"id":29,"depth":605,"text":30},{"id":61,"depth":605,"text":62,"children":609},[610],{"id":171,"depth":611,"text":172},3,{"id":322,"depth":605,"text":323},{"id":483,"depth":605,"text":484},{"id":523,"depth":605,"text":524},{"id":577,"depth":605,"text":578},"Moving from Papertrail to Lumber: what replaces syslog, remote_syslog2, logspout and Heroku log drains, how systems, groups, searches, alerts and archives map, what has no match, and running both while you switch.","md",{},true,"\u002Fdocs\u002Fpapertrail",{"title":5,"description":616},"docs\u002F13.papertrail","d10fa-ScQEQOKoZyLUOxxBufedvXpOc2OgwHgzstCao",[625,627],{"title":41,"path":40,"stem":626,"children":-1},"docs\u002F12.http-api",null,1795126791088]