Customizing Sanic's Logging output on Gunicorn

For those of you who didn't know, Sanic is a Python 3.6+ web server and web framework that’s written to go fast. It allows the usage of the async/await syntax added in Python 3.5, which makes your code non-blocking and speedy. Sanic's API is highly influenced by Flask and the API is really good. I worked on a personal project lately and found out that doing custom logging on Sanic is quite hard. You don't get a lot of information from Sanic's logging library and since it's based on the default Python 3 logging library , the information it provides is limited. My initial thought was since I will use Gunicorn, let's use Gunicorn's --access-logformat to get the information I needed. The functionality provided a lot of information and I can make use of it to get what I need. However, when you use Sanic Gunicorn Worker, which you need to use to make it work on Gunicorn, it will only use Sanic's logging output. I did a lot of googling and it seems like a lo

Lessons From Leading and Developing Product Engineering Teams - Part 2

In my previous post I explained the first part of of my experience. I covered about trust, team empowerment, and direction clarity. In this post, I’ll focus on people aspects.  If you missed part 1, you can read it here. #4 - Take care of your people Your team members are your partners in achieving your goal. You should not see them as someone from a lower position. Instead, see them as people having different roles and skillsets. Learn from your team as your team will also learn from you. Grow collective wisdom. Read into each other’s mind and understand how to work best with each team members. The collective wisdom in a team is the one that will drive the team forward. Embrace it, and foster the development of the collective wisdom. The question that is usually asked would be How do I take care of my people? I’m from Indonesia, and here we have a saying "Tak kenal maka tak sayang" It means if you haven’t known someone, you can’t care about them. That, my friend, is exactly

Lessons From Leading and Developing Product Engineering Teams - Part 1

The WFH period gives me extra time to think and reflect back on the lessons I’ve gained throughout my 15+ years career. I spent most of it leading others and I've gathered a lot of practical knowledge. I want to share it to help others learning to take up leadership. So, here are some important lessons about leading people based on my experience. It's a long read, so please bear with me, I'll split it into 3 parts. #1 - It all starts with trust Hire people you can trust. This brings a world of difference to the team dynamics. On every interview, I always ask myself the following questions. Can I trust this person? Will this person help the other team members? When I am confident to hire someone, it means that I trust that person enough to work with the other team members. The mindset I establish would always be Trusted, until proven otherwise. I mean, why would you even hire someone you can't trust? I've seen a lot of people hiring people but are too afraid to trust

My Take on The 10X Engineer Myth

Lately the tech landscape is discussing a lot about the 10X engineer myth. It has always been a very interesting point to discuss. What makes a 10X engineer and where to find them? What’s my take on what makes a 10X engineer? Let’s see in details how I see it. No I don’t see Rambo as the ideal 10X Engineer. Based on my own experience, a 10X engineer is that team member that is able to perform to his maximum abilities. The engineer enables other team members to be as effective as possible in unlocking the team’s value. Here are some values that describes a 10X engineer. First, the engineer understands what he knows well and is well aware of the areas he needs to improve. The engineer should be able to understand the problems he’s trying to solve by applying his knowledge or by asking the right questions to gain as thorough understanding of the problem. A good understanding of the problem will leads to a more effective problem solving. Second, the engineer is

It’s Been 3 Years

It’s been 3 years since I last wrote something in this blog. Why? I’ve been really busy and I’ve been learning about a lot of things. I’ll try to start writing at least once a month moving forward. I believe I have a bunch of things I can share with all of you. As usual, it can be both life lessons of tech stuff. Hope it’ll  be useful for all of you to learn. Anyways, here’s to start writing again. regards -E- follow @femmerling on twitter visit my website

MotherNature: A Framework-Agnostic Python Environment Variables Manager

In today's fast-paced tech startup environment you need to ship things fast. This makes way to the blossoming continuous integration and code promotion system. Continuous integration and code promotion have several requirements. One of it is environment variables management. This will enable your code promotion easier. Change your environments and you still get the correct values.  In python world there are tools for this but most of it are tailored to certain frameworks. Take Flask-Environments and Django-Environ. These solutions does not always work everywhere. About 4 months ago, the app I worked on requires me to use Apache Thrift. The public facing API is using Flask. I can use Flask-Environments. But, the micro-services are build using standard Thrift Servers. These babies do not have any environment variables manager. This was when I decided that I should write my own. Enter MotherNature, a framework agnostic python environment variables manager. It comes with sever

Thank You Traveloka

If you read my blog you'll notice that I joined Traveloka around 9 months ago. It was my first time working for a product company and it was a great experience. I've always worked for a service company before that. Traveloka is an amazing company and the growth is staggering. I learned a lot about working with app at scale and the mobile app landscape. The experience gained is invaluable. Around 4 years ago I had this idea about a social shopping app called nawaran . I built it in 3 months and launched it but the ecosystem wasn't ready. So I decided to shut it down. A few months back I had a chat with some friends with a similar idea. They are building something similar and I thought that it's about time I chase that dream. This is when I decide that it's time to move on and so I joined them. Fast forward a couple of months and here we are, on my last day as a Traveloka employee. Thank you Traveloka, for giving me the chance to get exposed more to the prod