As noted in comments and Joe Strazzere's answer, to get the definitive answer to this, you need to check with your employer. If this "senior" is not your supervisor, this may be nothing more than their personal opinion. However, now that something has been said, it would be wise to learn the actual facts. There may be an organizational policy of which you aren't aware that prohibits personal blogging. Alternatively, this just may be something your boss feels strongly about.
It seems you may not understand why such activity would be prohibited, so I'll suggest a few reasons:
If your blog generates any personal income for you through advertisements or other means, there may be a conflict of interest. For example, if you work (whether directly or through a service company) for a governmental agency, there may be prohibitions against using governmental resources for personal gain.
There may be concerns that you would divulge trade secrets or information which would be negative for your employer, such as being behind schedule.
Management may simply feel that you should be putting your efforts into your assignments.
While it doesn't seem to be the case here, maybe there are already approved documentation means available that you do not know about. If there are such, you should learn about and use them.
While you may need to move carefully here, this could be an opportunity for you. Make certain that there are not already approved documentation methods available within your organization. You could then investigate such tools (content management systems, document management systems, wikis, etc.), test some, and then make a recommendation as to what you find works best. You may need to work on this on your own time initially, especially if you do not get prior approval for such research.
To address the actual question:
Is it not right to log/write something useful when you are at work as a note or a lesson learned - which can be helpful for future to an individual or to a group? How do you manage this?
It is (usually) not inherently wrong to document what you do and how you deal with problems you encounter. (I say "usually" because there are places that don't want to be bothered with such, and maybe some places where they don't want to leave anything that could be found.) That said, some methods of documentation may not meet with universal approval, as you seem to be finding. As alluded to above, much of the reason for concern is who might be able to see the documentation. Keeping notes on paper is usually okay. Text or word processor documents have rarely caused problems to my knowledge, but I have known of a couple people who got in trouble for leaving paper copies of such documentation in places where someone found the document who wasn't meant to see it. Putting something on a public web site potentially opens your notes to anyone on the World Wide Web, thus management may feel they need to be very concerned with what is said.
My work place has internal wikis and CMS systems for documentation. I have also maintained a personal blog through my last couple jobs. I keep notes for reporting purposes, as well as to have as a future reference should I need to refresh my memory about previous work I did. However, that blog has no links to it, has settings to prevent indexing by search engines, and is password protected