Though they haven’t always seen eye to eye on education issues, Mayor Bloomberg’s relationship with Council of School Supervisors and Administrators President Ernie Logan is still in good shape as his third term comes to a close.

Bloomberg’s affection for principals and their union boss was on display this week during a speech at a gala event hosted by New Visions for New Public Schools. The education organization, which partnered with the Department of Education to create 100 small high schools and charter schools during Bloomberg’s tenure, awarded him with its “Visionary Award.”

“He’s going to be embarrassed when I tell you this,” Bloomberg said. “But Ernie Logan, who is the president of the principals union, and his members have made an enormous difference.”

The remarks start about 2 minutes and 40 seconds into the video.

A cornerstone of the reforms that Bloomberg brought when he won control of the school system in 2002 was to give principals more decision-making authority around how to run their schools, a managerial style based on his private-sector experience.

“No organization works without good management,” Bloomberg said. “Principals really are the keys to making sure that all of the teachers can use their skills and work together and get the training and support that they need.”

“I just think that the principals that we’ve been able to attract that Ernie represents really are the ones, the great unsung heroes,” Bloomberg added.

The rapid expansion of schools under Bloomberg — 654 new ones since 2002 — has drained the talent pool and led to concerns of a shortage of high-quality  leaders in the system. The city has estimated it must hire up to 200 principals a year and said it struggles to attract people for those positions.

To address the issues, the city has in recent years developed its own leadership academy and expanded a series of professional development programs.

Logan and the CSA has often sided with the powerful teachers union in disputes with the city over the years, most notably on Bloomberg’s school closure policies and principal evaluation plans. But Logan found common ground too, most recently when CSA settled on a principal evaluation deal in the eleventh hour after months of conflict.

Bloomberg has a thornier relationship with the United Federation of Teachers, though Bloomberg made sure to recognize its members as well.

“We all talk about teachers, and I love them. We have 75,000 of the best teachers in the world,” Bloomberg said. “But the principals never get the respect and the adulation and recognition that I think they deserve.”

Another highlight of Bloomberg’s speech was something he didn’t say. While recognizing city’s all of the people who work in New York City schools and in the Department of Education, he left out Cathie Black and her rocky four-month tenure as his second chancellor as one of the agency heads who helped steer the system for the last 12 years.

“The truth of the matter is, it was not me. It was simply the people that I was lucky enough to work with,”  Bloomberg said. “First Joel Klein and then Dennis Walcott.”

As Bloomberg’s third term ends, he’s picking up other awards and recognitions for his work on youth and education issues. On Thursday, Bloomberg also received a Public Service Leadership Award at a Children’s Aid Society gala.