[{"data":1,"prerenderedAt":1259},["ShallowReactive",2],{"blog-manage-logs-with-logrotate":3,"blog-all-for-related":765},{"id":4,"title":5,"author":6,"body":7,"cardAlt":5,"categories":750,"description":753,"draft":754,"extension":755,"headerImage":756,"keywords":757,"meta":758,"name":759,"navigation":88,"path":760,"seo":761,"series":6,"stem":762,"updated":6,"year":763,"__hash__":764},"blog\u002Fblog\u002Fmanage-logs-with-logrotate.md","Using Logrotate to manage logs",null,{"type":8,"value":9,"toc":742},"minimark",[10,14,17,738],[11,12,13],"p",{},"In this article, we learn how to manage and configure logs using logrotate. This can be useful since logs can eat up a lot of space just in few days. Even at work, I faced this issue when one service was generating > 1GB of logs in a day, which is when I learned about logrotate.",[11,15,16],{},"We will also explore an example where we configure Postgres logs.",[18,19,20,23,28,31,41,44,52,310,329,332,334,338,341,354,357,421,424,463,466,471,485,489,492,529,533,536,561,564,567,633,643,649,672],"ads",{},[21,22],"hr",{},[24,25,27],"h2",{"id":26},"what-is-logrotate","What is Logrotate?",[11,29,30],{},"From the man page -",[32,33,34],"blockquote",{},[11,35,36,40],{},[37,38,39],"strong",{},"Logrotate"," is designed to ease administration of systems that generate large numbers of log files. It allows automatic rotation,\ncompression, removal, and mailing of log files. Each log file may be\nhandled daily, weekly, monthly, or when it grows too large.",[11,42,43],{},"That explains it pretty well, this system utility is used to manage how logs are to be stored (based on time, size, etc). It handles compression of log files. This is important because if logs are not rotated and eventually removed after a period of time, the whole of your disk space will be consumed by logs.",[11,45,46,47,51],{},"In Unix, the default lograte file in stored at ",[48,49,50],"code",{},"\u002Fetc\u002Flogrotate.conf"," Default configs look like this -",[53,54,59],"pre",{"className":55,"code":56,"language":57,"meta":58,"style":58},"language-bash shiki shiki-themes github-light github-dark","# see \"man logrotate\" for details\n# rotate log files weekly\nweekly\n\n# use the syslog group by default, since this is the owning group\n# of \u002Fvar\u002Flog\u002Fsyslog.\nsu root syslog\n\n# keep 4 weeks worth of backlogs\nrotate 4\n\n# create new (empty) log files after rotating old ones\ncreate\n\n# uncomment this if you want your log files compressed\n#compress\n\n# packages drop log rotation information into this directory\ninclude \u002Fetc\u002Flogrotate.d\n\n# no packages own wtmp, or btmp -- we'll rotate them here\n\u002Fvar\u002Flog\u002Fwtmp {\n    missingok\n    monthly\n    create 0664 root utmp\n    rotate 1\n}\n\n\u002Fvar\u002Flog\u002Fbtmp {\n    missingok\n    monthly\n    create 0660 root utmp\n    rotate 1\n}\n\n# system-specific logs may be configured here\n","bash","",[48,60,61,70,76,83,90,96,102,115,120,126,136,141,147,153,158,164,170,175,181,190,195,201,210,216,222,236,245,252,257,265,270,275,287,294,299,304],{"__ignoreMap":58},[62,63,66],"span",{"class":64,"line":65},"line",1,[62,67,69],{"class":68},"sJ8bj","# see \"man logrotate\" for details\n",[62,71,73],{"class":64,"line":72},2,[62,74,75],{"class":68},"# rotate log files weekly\n",[62,77,79],{"class":64,"line":78},3,[62,80,82],{"class":81},"sScJk","weekly\n",[62,84,86],{"class":64,"line":85},4,[62,87,89],{"emptyLinePlaceholder":88},true,"\n",[62,91,93],{"class":64,"line":92},5,[62,94,95],{"class":68},"# use the syslog group by default, since this is the owning group\n",[62,97,99],{"class":64,"line":98},6,[62,100,101],{"class":68},"# of \u002Fvar\u002Flog\u002Fsyslog.\n",[62,103,105,108,112],{"class":64,"line":104},7,[62,106,107],{"class":81},"su",[62,109,111],{"class":110},"sZZnC"," root",[62,113,114],{"class":110}," syslog\n",[62,116,118],{"class":64,"line":117},8,[62,119,89],{"emptyLinePlaceholder":88},[62,121,123],{"class":64,"line":122},9,[62,124,125],{"class":68},"# keep 4 weeks worth of backlogs\n",[62,127,129,132],{"class":64,"line":128},10,[62,130,131],{"class":81},"rotate",[62,133,135],{"class":134},"sj4cs"," 4\n",[62,137,139],{"class":64,"line":138},11,[62,140,89],{"emptyLinePlaceholder":88},[62,142,144],{"class":64,"line":143},12,[62,145,146],{"class":68},"# create new (empty) log files after rotating old ones\n",[62,148,150],{"class":64,"line":149},13,[62,151,152],{"class":81},"create\n",[62,154,156],{"class":64,"line":155},14,[62,157,89],{"emptyLinePlaceholder":88},[62,159,161],{"class":64,"line":160},15,[62,162,163],{"class":68},"# uncomment this if you want your log files compressed\n",[62,165,167],{"class":64,"line":166},16,[62,168,169],{"class":68},"#compress\n",[62,171,173],{"class":64,"line":172},17,[62,174,89],{"emptyLinePlaceholder":88},[62,176,178],{"class":64,"line":177},18,[62,179,180],{"class":68},"# packages drop log rotation information into this directory\n",[62,182,184,187],{"class":64,"line":183},19,[62,185,186],{"class":81},"include",[62,188,189],{"class":110}," \u002Fetc\u002Flogrotate.d\n",[62,191,193],{"class":64,"line":192},20,[62,194,89],{"emptyLinePlaceholder":88},[62,196,198],{"class":64,"line":197},21,[62,199,200],{"class":68},"# no packages own wtmp, or btmp -- we'll rotate them here\n",[62,202,204,207],{"class":64,"line":203},22,[62,205,206],{"class":81},"\u002Fvar\u002Flog\u002Fwtmp",[62,208,209],{"class":110}," {\n",[62,211,213],{"class":64,"line":212},23,[62,214,215],{"class":81},"    missingok\n",[62,217,219],{"class":64,"line":218},24,[62,220,221],{"class":81},"    monthly\n",[62,223,225,228,231,233],{"class":64,"line":224},25,[62,226,227],{"class":81},"    create",[62,229,230],{"class":134}," 0664",[62,232,111],{"class":110},[62,234,235],{"class":110}," utmp\n",[62,237,239,242],{"class":64,"line":238},26,[62,240,241],{"class":81},"    rotate",[62,243,244],{"class":134}," 1\n",[62,246,248],{"class":64,"line":247},27,[62,249,251],{"class":250},"sVt8B","}\n",[62,253,255],{"class":64,"line":254},28,[62,256,89],{"emptyLinePlaceholder":88},[62,258,260,263],{"class":64,"line":259},29,[62,261,262],{"class":81},"\u002Fvar\u002Flog\u002Fbtmp",[62,264,209],{"class":110},[62,266,268],{"class":64,"line":267},30,[62,269,215],{"class":81},[62,271,273],{"class":64,"line":272},31,[62,274,221],{"class":81},[62,276,278,280,283,285],{"class":64,"line":277},32,[62,279,227],{"class":81},[62,281,282],{"class":134}," 0660",[62,284,111],{"class":110},[62,286,235],{"class":110},[62,288,290,292],{"class":64,"line":289},33,[62,291,241],{"class":81},[62,293,244],{"class":134},[62,295,297],{"class":64,"line":296},34,[62,298,251],{"class":250},[62,300,302],{"class":64,"line":301},35,[62,303,89],{"emptyLinePlaceholder":88},[62,305,307],{"class":64,"line":306},36,[62,308,309],{"class":68},"# system-specific logs may be configured here\n",[11,311,312,313,316,317,320,321,324,325,328],{},"Apart from the config file, there is also a directory ",[48,314,315],{},"\u002Fetc\u002Flogrotate.d"," that contains the packages you install that need help with log rotation. Eg. ",[48,318,319],{},"nginx",", ",[48,322,323],{},"postgresql-common",",",[48,326,327],{},"dpkg"," etc. This directory contains config files with the name of the package i.e these package-specific configs are only applicable to a particular package.",[11,330,331],{},"In case you want to explore more on logrotate, check the resources section at the end of the article.",[21,333],{},[24,335,337],{"id":336},"managing-postgres-logs-with-logrotate","Managing Postgres logs with Logrotate",[11,339,340],{},"In the previous section, we learned where are the configs stored. Let's check the logrotate configs for postgres.",[53,342,344],{"className":55,"code":343,"language":57,"meta":58,"style":58},"cat \u002Fetc\u002Flogrotate.d\u002Fpostgresql-common\n",[48,345,346],{"__ignoreMap":58},[62,347,348,351],{"class":64,"line":65},[62,349,350],{"class":81},"cat",[62,352,353],{"class":110}," \u002Fetc\u002Flogrotate.d\u002Fpostgresql-common\n",[11,355,356],{},"The default configs would be like this -",[53,358,360],{"className":55,"code":359,"language":57,"meta":58,"style":58},"\u002Fvar\u002Flog\u002Fpostgresql\u002F*.log {\n       weekly\n       rotate 10\n       copytruncate\n       delaycompress\n       compress\n       notifempty\n       missingok\n       su root root\n}\n",[48,361,362,369,374,382,387,392,397,402,407,417],{"__ignoreMap":58},[62,363,364,367],{"class":64,"line":65},[62,365,366],{"class":81},"\u002Fvar\u002Flog\u002Fpostgresql\u002F*.log",[62,368,209],{"class":110},[62,370,371],{"class":64,"line":72},[62,372,373],{"class":81},"       weekly\n",[62,375,376,379],{"class":64,"line":78},[62,377,378],{"class":81},"       rotate",[62,380,381],{"class":134}," 10\n",[62,383,384],{"class":64,"line":85},[62,385,386],{"class":81},"       copytruncate\n",[62,388,389],{"class":64,"line":92},[62,390,391],{"class":81},"       delaycompress\n",[62,393,394],{"class":64,"line":98},[62,395,396],{"class":81},"       compress\n",[62,398,399],{"class":64,"line":104},[62,400,401],{"class":81},"       notifempty\n",[62,403,404],{"class":64,"line":117},[62,405,406],{"class":81},"       missingok\n",[62,408,409,412,414],{"class":64,"line":122},[62,410,411],{"class":81},"       su",[62,413,111],{"class":110},[62,415,416],{"class":110}," root\n",[62,418,419],{"class":64,"line":128},[62,420,251],{"class":250},[11,422,423],{},"Let me explain some of the parameters used above -",[425,426,427,434,444,457],"ul",{},[428,429,430,433],"li",{},[48,431,432],{},"weekly"," - Log files are rotated every week. You can set this option to daily, monthly, yearly also.",[428,435,436,439,440,443],{},[48,437,438],{},"rotate 10"," - This means that Log files are rotated 10 times before they are removed. In case you want to store all logs, you can also automatically configure to mail the logs which are going to be removed. In case you don't want to store any past logs, just set the count to ",[48,441,442],{},"0",".",[428,445,446,449,450,453,454],{},[48,447,448],{},"compress"," - Older log files are first compressed and then stored. By default, ",[48,451,452],{},"gzip"," is used. You can always unzip to read the logs later using ",[48,455,456],{},"gzip -d filename.gz",[428,458,459,462],{},[48,460,461],{},"notifempty"," - It tells logrotate to avoid rotation in case the original log file is empty. (This can happen if there are no logs being produced)",[11,464,465],{},"Now you understand the basic usage of logrotate. Let's see another scenario where you want to configure logrotate.",[467,468,470],"h3",{"id":469},"rotate-based-on-the-size-of-log-files","Rotate based on the size of log files",[11,472,473,474,477,478,320,481,484],{},"You can use the ",[48,475,476],{},"size"," option in logrotate for this.\nEg. ",[48,479,480],{},"size 100k",[48,482,483],{},"size 10M"," for 100KB and 10MB respectively.",[467,486,488],{"id":487},"create-log-files-with-specific-permission","Create log files with specific permission",[11,490,491],{},"For this, we can specify with create option. Eg -",[53,493,495],{"className":55,"code":494,"language":57,"meta":58,"style":58},"**create**  _mode owner group_\n# example\ncreate 0640 mohit mohit\n",[48,496,497,511,516],{"__ignoreMap":58},[62,498,499,503,506,508],{"class":64,"line":65},[62,500,502],{"class":501},"szBVR","**",[62,504,505],{"class":250},"create",[62,507,502],{"class":501},[62,509,510],{"class":250},"  _mode owner group_\n",[62,512,513],{"class":64,"line":72},[62,514,515],{"class":68},"# example\n",[62,517,518,520,523,526],{"class":64,"line":78},[62,519,505],{"class":81},[62,521,522],{"class":134}," 0640",[62,524,525],{"class":110}," mohit",[62,527,528],{"class":110}," mohit\n",[467,530,532],{"id":531},"mail-log-files-before-removal","Mail log files before removal",[11,534,535],{},"As mentioned above, if you want to store all logs you can simply set up a mail where these logs will be sent.",[53,537,539],{"className":55,"code":538,"language":57,"meta":58,"style":58},"mail yourEmail@domain.com\n# Example\nmail code@xyz.com\n",[48,540,541,549,554],{"__ignoreMap":58},[62,542,543,546],{"class":64,"line":65},[62,544,545],{"class":81},"mail",[62,547,548],{"class":110}," yourEmail@domain.com\n",[62,550,551],{"class":64,"line":72},[62,552,553],{"class":68},"# Example\n",[62,555,556,558],{"class":64,"line":78},[62,557,545],{"class":81},[62,559,560],{"class":110}," code@xyz.com\n",[11,562,563],{},"Suppose the rotate count is set as 10 then when the number of logs reaches 11, the oldest log will be mailed to the provided address.",[11,565,566],{},"This is how I keep my Postgres log configs -",[53,568,570],{"className":55,"code":569,"language":57,"meta":58,"style":58},"\u002Fvar\u002Flog\u002Fpostgresql\u002F*.log {\n       weekly\n       size 100M\n       rotate 8\n       missingok\n       compress\n       delaycompress\n       nomail\n       notifempty\n       create 0660 root root\n}\n",[48,571,572,578,582,590,597,601,605,609,614,618,629],{"__ignoreMap":58},[62,573,574,576],{"class":64,"line":65},[62,575,366],{"class":81},[62,577,209],{"class":110},[62,579,580],{"class":64,"line":72},[62,581,373],{"class":81},[62,583,584,587],{"class":64,"line":78},[62,585,586],{"class":81},"       size",[62,588,589],{"class":110}," 100M\n",[62,591,592,594],{"class":64,"line":85},[62,593,378],{"class":81},[62,595,596],{"class":134}," 8\n",[62,598,599],{"class":64,"line":92},[62,600,406],{"class":81},[62,602,603],{"class":64,"line":98},[62,604,396],{"class":81},[62,606,607],{"class":64,"line":104},[62,608,391],{"class":81},[62,610,611],{"class":64,"line":117},[62,612,613],{"class":81},"       nomail\n",[62,615,616],{"class":64,"line":122},[62,617,401],{"class":81},[62,619,620,623,625,627],{"class":64,"line":128},[62,621,622],{"class":81},"       create",[62,624,282],{"class":134},[62,626,111],{"class":110},[62,628,416],{"class":110},[62,630,631],{"class":64,"line":138},[62,632,251],{"class":250},[11,634,635,636,443],{},"You can also configure logs using postgres configs. Check details ",[637,638,642],"a",{"href":639,"rel":640},"https:\u002F\u002Fwww.postgresql.org\u002Fdocs\u002F9.1\u002Fruntime-config-logging.html",[641],"nofollow","here (runtime logging configs)",[11,644,645,648],{},[37,646,647],{},"Note"," : Logrotate runs based on cron jobs. If you want to do a force reload, this can be achieved manually using -",[53,650,652],{"className":55,"code":651,"language":57,"meta":58,"style":58},"# for postgres\nsudo logrotate -vf \u002Fetc\u002Flogrotate.d\u002Fpostgresql-common\n",[48,653,654,659],{"__ignoreMap":58},[62,655,656],{"class":64,"line":65},[62,657,658],{"class":68},"# for postgres\n",[62,660,661,664,667,670],{"class":64,"line":72},[62,662,663],{"class":81},"sudo",[62,665,666],{"class":110}," logrotate",[62,668,669],{"class":134}," -vf",[62,671,353],{"class":110},[18,673,674,676,680,703,710,719,721,724,733],{},[21,675],{},[24,677,679],{"id":678},"resources","Resources",[425,681,682,689,696],{},[428,683,684],{},[637,685,688],{"href":686,"rel":687},"https:\u002F\u002Flinux.die.net\u002Fman\u002F8\u002Flogrotate",[641],"Man page",[428,690,691],{},[637,692,695],{"href":693,"rel":694},"https:\u002F\u002Fwww.digitalocean.com\u002Fcommunity\u002Ftutorials\u002Fhow-to-manage-logfiles-with-logrotate-on-ubuntu-16-04",[641],"Manage Logfiles with Logrotate",[428,697,698],{},[637,699,702],{"href":700,"rel":701},"https:\u002F\u002Fwww.endpoint.com\u002Fblog\u002F2014\u002F11\u002F12\u002Fdear-postgresql-where-are-my-logs",[641],"Postgres - Where are my logs",[11,704,705,706,709],{},"Awesome! You just learned how to manage logs using the ",[48,707,708],{},"lograte"," command. Do try to configure your logs according to your need as an exercise!",[11,711,712,713,718],{},"Liked the article? Consider ",[637,714,717],{"href":715,"rel":716},"https:\u002F\u002Fwww.buymeacoffee.com\u002FchHAzigTb",[641],"supporting me"," ☕️",[21,720],{},[11,722,723],{},"I hope you learned something new. Feel free to suggest improvements ✔️",[11,725,726,727,732],{},"I share regular updates and resources on ",[637,728,731],{"href":729,"rel":730},"https:\u002F\u002Ftwitter.com\u002Fmkfeuhrer",[641],"Twitter",". Let's connect!",[11,734,735],{},[37,736,737],{},"Keep exploring 🔎 Keep learning 🚀",[739,740,741],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}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);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}",{"title":58,"searchDepth":72,"depth":72,"links":743},[744,745],{"id":26,"depth":72,"text":27},{"id":336,"depth":72,"text":337,"children":746},[747,748,749],{"id":469,"depth":78,"text":470},{"id":487,"depth":78,"text":488},{"id":531,"depth":78,"text":532},[751,752],"Linux","Programming","Learn how to use logrotate system utility to manage logs with example",false,"md","blog\u002Fmanage-logs-with-logrotate\u002Fmanage-logs-with-logrotate-card.webp","logrotate examples,logrotate ubuntu,run logrotate manually,postgres logrotate",{},"manage-logs-with-logrotate","\u002Fblog\u002Fmanage-logs-with-logrotate",{"title":5,"description":753},"blog\u002Fmanage-logs-with-logrotate","2020-09-08","ALwL4m-C5vUaU5LbFOiNZTadh6OFBzeH7XfqIq0mDd0",[766,773,780,788,797,804,811,818,824,830,836,842,848,858,864,871,878,885,891,898,904,910,916,922,928,934,940,946,953,960,966,972,978,984,990,996,1002,1008,1014,1020,1026,1032,1038,1040,1046,1052,1058,1065,1071,1077,1084,1091,1097,1104,1110,1117,1123,1130,1136,1142,1148,1154,1160,1166,1172,1178,1184,1190,1196,1202,1209,1215,1222,1228,1234,1240,1247,1253],{"path":767,"title":768,"description":769,"categories":770,"draft":88,"year":772,"series":6},"\u002Fblog\u002Fai-assisted-workstation","Building an AI-Assisted Personal Workstation","How I built a personal AI workstation: markdown knowledge base, portable agent skills, handoff-driven sessions. What worked, what broke, what I would change.",[771,752],"Productivity","2026-08-26",{"path":774,"title":775,"description":776,"categories":777,"draft":754,"year":779,"series":6},"\u002Fblog\u002Faws-s3-golang","Uploading images to AWS S3 in Golang","In this tutorial I cover how to upload, fetch and manage other operations for objects on AWS S3 in Golang",[778,752],"Golang","2020-01-12",{"path":781,"title":782,"description":783,"categories":784,"draft":754,"year":787,"series":6},"\u002Fblog\u002Fbooks-for-engineers","Best Books for Software Engineers","Best Books to help you build you software engineering career - ranging from fundamentats, interview prep to productivity.",[785,786],"Books","Life","2021-12-26",{"path":789,"title":790,"description":791,"categories":792,"draft":754,"year":796,"series":6},"\u002Fblog\u002Fbuilding-acrons","Building Acrons 🚀","Building Acrons, a one-stop tool to decode everyday acronyms like DIY, FOMO, and BRB without losing your flow.",[793,794,795],"Side Projects","Web","Tools","2020-05-26",{"path":798,"title":799,"description":800,"categories":801,"draft":754,"year":803,"series":6},"\u002Fblog\u002Fcap-theorem","CAP Theorem Explained","Learn the concept and misconceptions around popular CAP theorem in system design.",[802,752],"System Design","2021-07-26",{"path":805,"title":806,"description":807,"categories":808,"draft":754,"year":810,"series":6},"\u002Fblog\u002Fcode-reviews","Code Review Checklist","Why code reviews matter, and best practices that catch bugs early and keep code quality high before merge.",[809],"Engineering Principles","2020-07-20",{"path":812,"title":813,"description":814,"categories":815,"draft":754,"year":817,"series":6},"\u002Fblog\u002Fdark-mode","Add Dark mode to websites","Dark mode is ❤️️ Add it to your websites with little CSS and JS",[816,794],"Javascript","2020-07-04",{"path":819,"title":820,"description":821,"categories":822,"draft":754,"year":823,"series":6},"\u002Fblog\u002Fdate-time-golang","Working with Date and Time in Go","Learn how to use time in Golang - Multiple formats, locations and using date.",[778,752],"2020-10-09",{"path":825,"title":826,"description":827,"categories":828,"draft":754,"year":829,"series":6},"\u002Fblog\u002Fdefer-in-golang","Understanding Defer In Golang","Learn about defer keyword in golang and how it can help you avoid panics due to bugs.",[778,752],"2021-05-05",{"path":831,"title":832,"description":833,"categories":834,"draft":754,"year":835,"series":6},"\u002Fblog\u002Fenums-golang","Implementing Enums in Golang","Enums are a way to defined set of constant values. Learn how to implement enums in Go using iota with examples.",[778,752],"2021-12-18",{"path":837,"title":838,"description":839,"categories":840,"draft":754,"year":841,"series":6},"\u002Fblog\u002Fenvironment-variable-golang","Guide to Environment variables in Go","Learn what are environment variables and how to use them in Go",[778,752],"2020-08-14",{"path":843,"title":844,"description":845,"categories":846,"draft":754,"year":847,"series":6},"\u002Fblog\u002Ferror-handling-golang","Handle errors the right way — Golang","How to handle errors in golang to make your life easy",[778,752],"2020-01-30",{"path":849,"title":850,"description":851,"categories":852,"draft":88,"year":855,"series":856},"\u002Fblog\u002Ffile-attack-document-macros","File Attack Deep Dives, Part 3: Document Macros","How malicious VBA hides in vbaProject.bin, which AutoOpen entry points fire it, and the sandbox signals that catch it.",[853,854],"Security","Systems","2026-09-17",{"name":857,"part":78},"File Attack Deep Dives",{"path":859,"title":860,"description":861,"categories":862,"draft":754,"year":772,"series":863},"\u002Fblog\u002Ffile-attack-field-guide","How File-Based Attacks Land: A Detection Engineer's Field Guide","A practical taxonomy of how malware and phishing arrive as files, why classic controls miss them, and how detection should think.",[853,854],{"name":857,"part":65},{"path":865,"title":866,"description":867,"categories":868,"draft":88,"year":869,"series":870},"\u002Fblog\u002Ffile-attack-html-smuggling","File Attack Deep Dives, Part 2: HTML Smuggling","How attackers assemble malware inside the browser with Blob URLs, and the URL and script tells that catch it.",[853,854],"2026-09-10",{"name":857,"part":72},{"path":872,"title":873,"description":874,"categories":875,"draft":88,"year":876,"series":877},"\u002Fblog\u002Ffile-attack-lnk-iso","File Attack Deep Dives, Part 5: LNK and ISO Smuggling","How ISO containers and weaponized shortcuts bypass Mark of the Web, and the forensic fields that catch them.",[853,854],"2026-10-01",{"name":857,"part":92},{"path":879,"title":880,"description":881,"categories":882,"draft":88,"year":883,"series":884},"\u002Fblog\u002Ffile-attack-pdf-url-actions","File Attack Deep Dives, Part 4: PDF URL Actions","How PDF OpenAction, Launch, and URI actions turn opening a document into a phishing click, and the action audit that catches them.",[853,854],"2026-09-24",{"name":857,"part":85},{"path":886,"title":887,"description":888,"categories":889,"draft":754,"year":890,"series":6},"\u002Fblog\u002Ffile-upload-golang","Uploading Files in Golang with Multipart Request","Learn how to upload files from your client to server as a multipart request in Golang.",[778,752],"2021-03-13",{"path":892,"title":893,"description":894,"categories":895,"draft":754,"year":897,"series":6},"\u002Fblog\u002Fgit-branch","Git Branch 101","Branching is a new path of development that makes it a lot easier to build features. Learn why and how to use branching in git.",[896,752],"Git","2022-03-20",{"path":899,"title":900,"description":901,"categories":902,"draft":754,"year":903,"series":6},"\u002Fblog\u002Fgit-pull-request-template","Guide to Pull Request Templates","Improve collaboration and code reviews with pull request templates. Blog include PR template and how to create one on github\u002Fgitlab",[896,752],"2023-08-24",{"path":905,"title":906,"description":907,"categories":908,"draft":754,"year":909,"series":6},"\u002Fblog\u002Fgit-remove-sensitive-info","Securing Git: Remove Sensitive Information","Protect your code from security breaches by using BFG tool to remove sensitive information from Git history. Learn how to do it in this comprehensive guide.",[896,752],"2023-10-16",{"path":911,"title":912,"description":913,"categories":914,"draft":754,"year":915,"series":6},"\u002Fblog\u002Fgit-tags-explained","Git tags : Explained","What Git tags are, why and when to use them, and how to start tagging releases in your own projects.",[896,752],"2020-06-18",{"path":917,"title":918,"description":919,"categories":920,"draft":754,"year":921,"series":6},"\u002Fblog\u002Fgo-dependency-injection","Dependency Injection in Go using Wire","Learn about dependency injection, its benefits and how to implement it in Go services using wire",[778,752],"2022-11-26",{"path":923,"title":924,"description":925,"categories":926,"draft":754,"year":927,"series":6},"\u002Fblog\u002Fgo-generics","Introduction to Generics in Go","Learn about generics in Golang, it's benefits and how to implement it in applications.",[778,752],"2022-11-27",{"path":929,"title":930,"description":931,"categories":932,"draft":754,"year":933,"series":6},"\u002Fblog\u002Fgo-in-memory-cache","Building In-Memory Cache in Go","Learn about in-memory caching in Golang, it's benefits and how to implement it with and without generics with a TTL(expiry).",[778,752],"2024-03-28",{"path":935,"title":936,"description":937,"categories":938,"draft":754,"year":939,"series":6},"\u002Fblog\u002Fgo-makefile","Ultimate Makefile for Golang","Boost your productivity and save time with ultimate Makefile for Golang projects.",[778,752],"2024-06-10",{"path":941,"title":942,"description":943,"categories":944,"draft":754,"year":945,"series":6},"\u002Fblog\u002Fgo-middleware","Mastering Middlewares in Golang","Learn about middlewares, their use cases and how to implement them in Golang applications",[778,752],"2022-03-13",{"path":947,"title":948,"description":949,"categories":950,"draft":754,"year":952,"series":6},"\u002Fblog\u002Fgo-naming-conventions","Naming Conventions in Golang","Why naming conventions matter in Go, with best practices and practical examples for clear, readable, maintainable code.",[778,752,951],"Code Quality","2023-05-19",{"path":954,"title":955,"description":956,"categories":957,"draft":754,"year":959,"series":6},"\u002Fblog\u002Fgo-with-redis","Go with Redis","A practical introduction to using Redis with Golang to make your applications faster with in-memory data storage.",[778,958,752],"Database","2020-05-03",{"path":961,"title":962,"description":963,"categories":964,"draft":754,"year":965,"series":6},"\u002Fblog\u002Fgolang-maps","Learn Maps in Golang (with examples)","A complete guide to maps in Golang: creating maps, adding and removing items, iterating, and how map equality works.",[778,752],"2020-09-10",{"path":967,"title":968,"description":969,"categories":970,"draft":754,"year":971,"series":6},"\u002Fblog\u002Fguide-to-cdn","Guide to Content Delivery Network","CDN is one of the backbone of modern world internet infrastructure. Learn about Content Delivery Network, it's working, types and benefits.",[802,752],"2022-01-23",{"path":973,"title":974,"description":975,"categories":976,"draft":754,"year":977,"series":6},"\u002Fblog\u002Fguide-to-rule-engines","Guide to Rule Engines","Rule Engines help in solving changing business requirements with ease. Learn all about Rule engines, it's working, benefits and how to implement one in Golang",[778,752],"2022-09-12",{"path":979,"title":980,"description":981,"categories":982,"draft":754,"year":983,"series":6},"\u002Fblog\u002Fhexagonal-architecture","Guide to Hexagonal Architecture","Learn how to design efficient application with hexagonal architecture with practical example",[802,752],"2020-12-13",{"path":985,"title":986,"description":987,"categories":988,"draft":754,"year":989,"series":6},"\u002Fblog\u002Fhttp-status-codes","Learn HTTP Status Codes","A tour of HTTP response status codes, what each class means, and when to use which code in your applications.",[794,752],"2020-07-30",{"path":991,"title":992,"description":993,"categories":994,"draft":754,"year":995,"series":6},"\u002Fblog\u002Fintroduction-to-goroutines","Introduction to Goroutines","Understand the basics of concurrency and learn how to work with Goroutines in golang.",[778,752],"2021-04-10",{"path":997,"title":998,"description":999,"categories":1000,"draft":754,"year":1001,"series":6},"\u002Fblog\u002Fjson-in-postgres-with-golang","Storing JSON in Postgres with Golang","Learn how to store JSON objects in Postgres and how to implement it in Golang.",[752,958,778],"2021-02-13",{"path":1003,"title":1004,"description":1005,"categories":1006,"draft":754,"year":1007,"series":6},"\u002Fblog\u002Fjson-web-token","Complete Guide to JWT","JSON Web Tokens are a very compact way to carry information. Learn about JWTs in depth, from its structure to when to use it.",[752,794],"2021-11-20",{"path":1009,"title":1010,"description":1011,"categories":1012,"draft":754,"year":1013,"series":6},"\u002Fblog\u002Flearn-to-say-no","Learning to say No","Learn why it's important to say 'NO'. How it helps in increasing productivity and explore strategies for saying No",[786,785],"2022-04-09",{"path":1015,"title":1016,"description":1017,"categories":1018,"draft":754,"year":1019,"series":6},"\u002Fblog\u002Flearn-unlearn-relearn","Learn - Unlearn - Relearn","Unlearning things to learn new is the way to grow. Discover how to do that!",[771,786],"2020-09-25",{"path":1021,"title":1022,"description":1023,"categories":1024,"draft":754,"year":1025,"series":6},"\u002Fblog\u002Flinting-in-golang","Introduction to Linting in Go","Introduction to improving code quality using linting. Learn how to add linting in your Go projects.",[778,752],"2021-07-07",{"path":1027,"title":1028,"description":1029,"categories":1030,"draft":754,"year":1031,"series":6},"\u002Fblog\u002Fload-balancing","Load Balancing 101","Complete guide on load balancers explaining the internal working and how does it help in making applications efficient.",[802,752],"2021-05-29",{"path":1033,"title":1034,"description":1035,"categories":1036,"draft":754,"year":1037,"series":6},"\u002Fblog\u002Fmaking-decisions-the-right-way","Making Decisions: The right way","Decisions are hard! Learn how to make the right decisions always",[771,786],"2020-06-07",{"path":760,"title":5,"description":753,"categories":1039,"draft":754,"year":763,"series":6},[751,752],{"path":1041,"title":1042,"description":1043,"categories":1044,"draft":754,"year":1045,"series":6},"\u002Fblog\u002Fmarshal-structs-golang","Marshal structs the right way: Golang","Why Golang marshals empty structs into your JSON instead of null, and how to marshal structs the right way.",[778,752],"2020-03-31",{"path":1047,"title":1048,"description":1049,"categories":1050,"draft":754,"year":1051,"series":6},"\u002Fblog\u002Fnotes-almanack-naval","Book Notes : Almanack of Naval Ravikant","My notes\u002Fhighlights from Almanack of Naval Ravikant book by Eric Jorgenson",[785,786],"2020-10-17",{"path":1053,"title":1054,"description":1055,"categories":1056,"draft":754,"year":1057,"series":6},"\u002Fblog\u002Fnotes-anything-you-want","Book Notes : Anything you want","My notes\u002Fhighlights from Anything you want book by Derek Sivers",[785,786],"2021-09-25",{"path":1059,"title":1060,"description":1061,"categories":1062,"draft":754,"year":1064,"series":6},"\u002Fblog\u002Fnotes-getting-real","Book Notes : Getting Real","My notes and highlights from Getting Real by Jason Fried and David Heinemeier Hansson on building web applications.",[785,1063],"Startups","2020-11-03",{"path":1066,"title":1067,"description":1068,"categories":1069,"draft":754,"year":1070,"series":6},"\u002Fblog\u002Fnotes-hell-yeah-or-no","Book Notes : Hell Yeah or No","My notes\u002Fhighlights from Hell Yeah or No book by Derek Sivers",[785,786],"2020-09-16",{"path":1072,"title":1073,"description":1074,"categories":1075,"draft":754,"year":1076,"series":6},"\u002Fblog\u002Fnotes-how-to-be-a-capitalist","Book Notes : How to Be a Capitalist Without Any Capital","My notes\u002Fhighlights from How to Be a Capitalist Without Any Capital by Nathan Latka",[785,1063],"2020-01-07",{"path":1078,"title":1079,"description":1080,"categories":1081,"draft":754,"year":1083,"series":6},"\u002Fblog\u002Fnotes-lean-b2b","Book Notes : Lean B2B","My notes and highlights from Lean B2B by Étienne Garbugli on assessing markets, building MVPs, and selling to businesses.",[785,1082],"Entrepreneurship","2022-07-02",{"path":1085,"title":1086,"description":1087,"categories":1088,"draft":754,"year":1090,"series":6},"\u002Fblog\u002Fnotes-lets-talk-money","Book Notes : Let's Talk Money","My notes and highlights from Let's Talk Money by Monica Halan on managing personal finances and savings.",[785,1089],"Personal Finance","2021-02-26",{"path":1092,"title":1093,"description":1094,"categories":1095,"draft":754,"year":1096,"series":6},"\u002Fblog\u002Fnotes-obviously-awesome","Book Notes : Obviously Awesome","My notes and highlights from Obviously Awesome by April Dunford on product positioning and marketing strategy.",[785,1063],"2020-04-26",{"path":1098,"title":1099,"description":1100,"categories":1101,"draft":754,"year":1103,"series":6},"\u002Fblog\u002Fnotes-refactoring-ui","Book Notes: Refactoring UI","My notes and highlights from Refactoring UI by Adam Wathan and Steve Schoger, full of practical design tips for engineers.",[785,1102],"Design","2020-05-09",{"path":1105,"title":1106,"description":1107,"categories":1108,"draft":754,"year":1109,"series":6},"\u002Fblog\u002Fnotes-rework","Book Notes: Rework","My notes and highlights from Rework by Jason Fried and David Heinemeier Hansson on a better way to succeed in business.",[785,1063],"2021-04-14",{"path":1111,"title":1112,"description":1113,"categories":1114,"draft":754,"year":1116,"series":6},"\u002Fblog\u002Fone-on-one-meetings","Guide to Effective 1:1 Meetings","One on One meetings are important for your personal & professional growth. Learn how to master 1:1s with your manager and peers.",[1115,771],"Career","2023-03-05",{"path":1118,"title":1119,"description":1120,"categories":1121,"draft":754,"year":1122,"series":6},"\u002Fblog\u002Fpersonal-okrs","Personal OKRs for Success","Why one should set personal OKRs and how to achieve success with them",[771,786],"2020-06-27",{"path":1124,"title":1125,"description":1126,"categories":1127,"draft":754,"year":1129,"series":6},"\u002Fblog\u002Fpoker-tips","Poker Tips: Johns Hopkins Poker Class","Notes from Johns Hopkins poker course. This guide will help you improve in Poker and win some large pots.",[786,1128],"Poker","2020-06-13",{"path":1131,"title":1132,"description":1133,"categories":1134,"draft":754,"year":1135,"series":6},"\u002Fblog\u002Fpomodoro","Get work done: The Pomo Way","Learn to focus and get productive by following the Pomodoro Technique",[771],"2020-10-24",{"path":1137,"title":1138,"description":1139,"categories":1140,"draft":754,"year":1141,"series":6},"\u002Fblog\u002Fpostgres-constraints","Postgres Constraints","Constraints are line of defense for database. Explore various types of constrainsts in postgres",[958,752],"2020-11-07",{"path":1143,"title":1144,"description":1145,"categories":1146,"draft":754,"year":1147,"series":6},"\u002Fblog\u002Fppf-explained","PPF Explained","Learn basics about Public Provident Fund and why you should invest",[786,1089],"2020-12-24",{"path":1149,"title":1150,"description":1151,"categories":1152,"draft":754,"year":1153,"series":6},"\u002Fblog\u002Fproductivity-chrome-extensions","Boost Productivity with Chrome Extensions","Utitizing chrome extensions to boost your productivity!",[771,795,794],"2020-04-24",{"path":1155,"title":1156,"description":1157,"categories":1158,"draft":754,"year":1159,"series":6},"\u002Fblog\u002Fproductivity-in-vscode","Improve your productivity with VS Code","Key VS Code features like the integrated terminal, shortcuts, and extensions that improved my everyday productivity.",[771,752],"2020-03-12",{"path":1161,"title":1162,"description":1163,"categories":1164,"draft":754,"year":1165,"series":6},"\u002Fblog\u002Freading-101","Improving Reading 101","Why reading matters, how to build a reading habit, and what to read next - from my own journey into books.",[785,786],"2020-04-04",{"path":1167,"title":1168,"description":1169,"categories":1170,"draft":754,"year":1171,"series":6},"\u002Fblog\u002Freverse-proxy","Understanding Reverse Proxy","Learn about reverse proxy, how it is different from forward proxy and explore advantages of using it in system design.",[802,752],"2021-10-03",{"path":1173,"title":1174,"description":1175,"categories":1176,"draft":754,"year":1177,"series":6},"\u002Fblog\u002Frunning-periodic-background-task-golang","Running periodic background tasks in Golang","How to run periodic background tasks in Golang by combining cron-style scheduling with background execution.",[778,752],"2019-11-21",{"path":1179,"title":1180,"description":1181,"categories":1182,"draft":754,"year":1183,"series":6},"\u002Fblog\u002Fsessions-in-golang","Sessions using Golang and Redis","How cookies and sessions work, and how to implement persistent login sessions in Golang using Redis.",[778,958,752],"2020-02-25",{"path":1185,"title":1186,"description":1187,"categories":1188,"draft":754,"year":1189,"series":6},"\u002Fblog\u002Fsolid-dry-kiss-yagni","Solid Dry Kiss Yagni","An introduction to the SOLID, DRY, KISS, and YAGNI principles and how they help you write cleaner, robust code.",[809],"2020-07-17",{"path":1191,"title":1192,"description":1193,"categories":1194,"draft":754,"year":1195,"series":6},"\u002Fblog\u002Fstack-in-golang","Implement Stack in Golang","Learn how to implement stack data structure in Golang (Full code)",[778,752],"2020-09-14",{"path":1197,"title":1198,"description":1199,"categories":1200,"draft":754,"year":1201,"series":6},"\u002Fblog\u002Fstart-oss-today","Start your Open Source journey today","Start your OSS journey with intro to GIT. Participate in Hacktoberfest!",[896,752],"2020-09-19",{"path":1203,"title":1204,"description":1205,"categories":1206,"draft":754,"year":1208,"series":6},"\u002Fblog\u002Fsticky-social-bar","Sticky social share component in HTML","Learn how to build a social media sharing component in HTML and add it to your website.",[752,1207],"Frontend","2021-02-05",{"path":1210,"title":1211,"description":1212,"categories":1213,"draft":754,"year":1214,"series":6},"\u002Fblog\u002Fterm-insurance","Term insurance Simplified","Everything you need to know before you buy a term insurance.",[786,1089],"2020-11-29",{"path":1216,"title":1217,"description":1218,"categories":1219,"draft":754,"year":1221,"series":6},"\u002Fblog\u002Fterminal-output-with-redirection","Handling terminal outputs with Redirection","Learn how to handle terminal outputs with Redirection and saving it to files",[751,1220,752],"Terminal","2020-09-06",{"path":1223,"title":1224,"description":1225,"categories":1226,"draft":754,"year":1227,"series":6},"\u002Fblog\u002Fthink-and-grow-rich","Book Notes: Think and Grow Rich","My notes and highlights from Think and Grow Rich by Napoleon Hill, covering its process for building wealth.",[785,786],"2020-05-19",{"path":1229,"title":1230,"description":1231,"categories":1232,"draft":754,"year":1233,"series":6},"\u002Fblog\u002Ftransactions-postgres-golang","Transactions on Postgres with Golang","Performing Postgres database operations in Golang with GORM, from basic queries to full transaction support.",[778,958,752],"2020-03-18",{"path":1235,"title":1236,"description":1237,"categories":1238,"draft":754,"year":1239,"series":6},"\u002Fblog\u002Fwaitgroups-in-golang","WaitGroups in Golang","Learn about WaitGroups in golang and how to use them to perform concurrent operations without blocking the main thread.",[778,752],"2022-05-31",{"path":1241,"title":1242,"description":1243,"categories":1244,"draft":754,"year":1246,"series":6},"\u002Fblog\u002Fwhat-i-use","What I Use: Products and Softwares","List of what I use in my day to day life ranging from terminal, editors, softwares, devices to accessories",[786,1245],"Tech","2024-06-01",{"path":1248,"title":1249,"description":1250,"categories":1251,"draft":754,"year":1252,"series":6},"\u002Fblog\u002Fyear-in-review-2020","Year in Review: 2020","It's a wrap! 2020 was a crazy year, See how my year went!",[786],"2020-12-31",{"path":1254,"title":1255,"description":1256,"categories":1257,"draft":754,"year":1258,"series":6},"\u002Fblog\u002Fyear-in-review-2021","Year in Review: 2021","It's a wrap! 2021 was a mixed bag, full of ups and downs. Key Goal for 2022: Start now!",[786],"2021-12-31",1788674977336]