I'm not sure how log lines came to be a part of query letters but here they are so you might as well learn to do them right.
Authors love to say things like "its like Jaws, but in the woods!" or "it's like Speed, but on tricycles, and with preschoolers!"
In other words, it's like a movie, but different.
Well, of course, this is a book you're sending a query for, so the first thing to remember is:
1. compare your book to a book
2. make sure your comparison book matches the tone of your book.
I've seen things like "It's just like that movie Home Alone, but this time the kid is alone cause the dad commits suicide".
Whoa! Hold your horses bucko.
Home Alone is a comic movie about a kid who gets left inadvertently and his parents move heaven and earth to get BACK to him. There's NO comparison to the tragedy of a parent committing suicide.
In other words "Silence of the Lambs" except Hannibal Lecter is a really fun kindergarten teacher just doesn't work.
3. Know the book you're using as a comparison to yours
The most egregious comparison error is to compare your work to something (usually one of my client's books) that you haven't read. Not only haven't read, but haven't even looked at the description on Amazon
"my book is an homage to Jimi Hendrix like The Electric Church by Jeff Somers" doesn't work on any level.
I think log lines are a waste of time mostly. They're very hard to do well. They're probably the very last thing you should write as you work on your query letter. That's because the hardest things to write are the sentences that have to sum up a book in just a few words.
Write the paragraph that tells me what the book is about first. Everything else is secondary.